Last active
December 14, 2015 07:49
-
-
Save telagraphic/5052978 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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