List findElement = (List) driver.findElement(By.tagName("a")); List links = findElement;
System.out.println(links.size());
for (int i = 1; i<=links.size(); i=i+1)
{
System.out.println(links.get(i).getText());
}
When i am trying to run this code, it is showing some issues Exception in thread "main" java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebElement cannot be cast to java.util.List at Home_Screen.Home.main(Home.java:60) I am running this for selenium webdriver 3.0 using google chrome
Aucun commentaire:
Enregistrer un commentaire