前
for (inti=0; i<lable.size(); i++){
if(lable.get(i).getText().contains(dQPlayerNumber)){
if(i==0){
WebElement player = driver.findElement(By.cssSelector("tbody[id$='tbodyPlayerListForPlayerRoster']tr:first-child td:nth-child(3) font"));
Assert.assertTrue(player.getText().contains(message));
log.info("Playerinfo: " + player.getText());
Assert.assertEquals(player.getAttribute("color"), "red");
log.info("Assert DQplayer on Stats and Standing");
}else{
WebElement player = driver.findElement(By.cssSelector("tbody[id$='tbodyPlayerListForPlayerRoster']tr:nth-child("+ (i+1) +") td:nth-child(3) font"));
Assert.assertTrue(player.getText().contains(message));
log.info("Playerinfo: " + player.getText());
Assert.assertEquals(player.getAttribute("color"), "red");
log.info("Assert DQplayer on Stats and Standing");
}
}
}
后