Doubt with xpath and selenium webdriver in java [closed]

-1

I can not get Java and webdriver to click on an XPath.

The website is the one of Movistar: www.movistar.es/Privada/DesafioUnico

Here is the image and command that I have placed.

    
asked by djuez 26.01.2018 в 13:14
source

1 answer

0

The element is inside an iframe, this implies that you must change to that iframe before trying to obtain the object:

driver.switchTo().frame("iframe_principal");
driver.findElement(By.xpath(".//a[@class='ng-binding']")).click();

    
answered by 29.01.2018 / 08:40
source