Skip to content
Permalink
Browse files

Avoid need to cast by using Generics

  • Loading branch information...
rhwood committed May 17, 2019
1 parent 2da7c09 commit b1761d72c90c3a2ef36944a4847f76092ea92906
Showing with 4 additions and 4 deletions.
  1. +4 −4 java/acceptancetest/step_definitions/jmri/web/WebServerAcceptanceSteps.java
@@ -75,14 +75,14 @@ public WebServerAcceptanceSteps(jmri.InstanceManager instance) {
// find the table body.

WebElement tableBody = webTable.findElement(By.tagName("tbody"));
List rows = tableBody.findElements(By.tagName("tr"));
List<WebElement> rows = tableBody.findElements(By.tagName("tr"));
// we make an assumption that the first column is the systemName and
// the last column is the state
int i;
for(i =0; i< rows.size(); i++){
List cols = ((WebElement)rows.get(i)).findElements(By.tagName("td"));
if(cols.size()>0 && ((WebElement)cols.get(0)).getText().equals(item)){
Assert.assertEquals("Expected State",state,((WebElement)cols.get(cols.size()-1)).getText());
List<WebElement> cols = rows.get(i).findElements(By.tagName("td"));
if(cols.size()>0 && cols.get(0).getText().equals(item)){
Assert.assertEquals("Expected State",state, cols.get(cols.size()-1).getText());
break;
}
}

0 comments on commit b1761d7

Please sign in to comment.
You can’t perform that action at this time.