Skip to content

Instantly share code, notes, and snippets.

@telagraphic
Last active December 14, 2015 07:49
Show Gist options
  • Save telagraphic/5052978 to your computer and use it in GitHub Desktop.
Save telagraphic/5052978 to your computer and use it in GitHub Desktop.
@wip
Scenario: Table has columns # codebidspage/CodeTable.feature:22
Then table has only these columns: # CodeTableStepDefs.table_has_only_these_ Then table has only these columns: # CodeTableStepDefs.table_has_only_these_columns(String>)
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:92)
at org.junit.Assert.assertTrue(Assert.java:43)
at org.junit.Assert.assertTrue(Assert.java:54)
at com.gfs.corp.bid.cucumber.codebidspage.CodeTableStepDefs.table_has_only_these_columns(CodeTableStepDefs.java:51)
at ✽.Then table has only these columns:(codebidspage/CodeTable.feature:23)
public List<WebElement> tableHeaders() {
WebElement tableHeaderRow = webDriver.findElement(By.xpath("//div[@id='sbaDataTable']/table[1]/thead[1]/tr[1]"));
List<WebElement> tableHeaders = tableHeaderRow.findElements(By.xpath("./th/div/span"));
return tableHeaders;
}
@Then("^table has only these columns:$")
public void table_has_only_these_columns(List<String> tableHeadersFromTest) throws Throwable {
waitForPageToLoad();
for (WebElement header : codeBidsPage.tableHeaders()) {
assertTrue(tableHeadersFromTest.contains(header.getText()));
}
//assertTrue(tableHeadersFromTest.contains(tableHeadersFromApp.get(0).getText()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment