I am trying to select the previous column of a webtable based on the text of the next column. Here is my code for(WebElement eachrow:noofrows ) { List col3=eachrow.findElements(By.xpath("//td[3]"));
for(WebElement text:col3)
{
String s1=text.getText();
System.out.println(s1);
if(s1==opt1)
{
driver.findElement(By.xpath("//td[2]")).click();
}
}
if(t.equals(choice1)||t.equals(choice2))
{
text.findElement(By.xpath("//td[2]")).click();
}
Here is a copy of the dom
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire