Skip to content

Instantly share code, notes, and snippets.

@telagraphic
Created February 27, 2013 19:22
Show Gist options
  • Save telagraphic/5050822 to your computer and use it in GitHub Desktop.
Save telagraphic/5050822 to your computer and use it in GitHub Desktop.
Comparing a list of values from cucumber feature to table header columns from the code bids table. tableHeadersFromTest is a list but isn't iterating in my code below. tableHeadersFromApp does loop. Am I missing something ? If not, then I may be missing something from the cucumber side of things...
@Then("^table has only these columns:$")
public void table_has_only_these_columns(List<String> tableHeadersFromTest) throws Throwable {
waitForPageToLoad();
List<WebElement> tableHeadersFromApp = codeBidsPage.tableHeaders();
for (String columnFromTest : tableHeadersFromTest) {
for (WebElement headerFromApp : tableHeadersFromApp) {
assertEquals(columnFromTest, headerFromApp.getText());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment