java.util.List<WebElement> f = driver.findElements(By.tagName("iframe"));
System.out.println(f.size());
if(f.size()>0) {
for (WebElement frameid : f){
if(frameid.getAttribute("id").equals("frame_name"))
{
driver.switchTo().frame(frameid);
}
}
}
No comments:
Post a Comment