1st element from list click
List<WebElement> el=driver.findElements(By.xpath("xpath"));
for(WebElement element:el){
if(!data.equalsIgnoreCase("Doesn't Matter")){
el.get(0).click(); // 1st element click from list
}
List<WebElement> el=driver.findElements(By.xpath("xpath"));
for(WebElement element:el){
if(!data.equalsIgnoreCase("Doesn't Matter")){
el.get(0).click(); // 1st element click from list
}
No comments:
Post a Comment