Quaatso Education

Home Forums Selenium Forum "Unable to locate Element" error

"Unable to locate Element" error

This topic contains 1 reply, has 2 voices, and was last updated by  Nandan Singh 1 year, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #3968

    Navin Mathur

    Website :https://myvodafone.vodafone.in/

    While entering the vlaue in username text box getting an error “Unable to locate Element” .I tried to enter the value through id ,xpath ,css selector but getting the same problem agaian and again.I tried other cases also which i found on google .

    I am able to click on any button or link through selenium.


    Nandan Singh


    You are not able to find element because the element is not on “HTML Page”. The element is embedded inside an “I-Frame”.
    So, in order to get any element of IFrame, we first need to “Switch to IFrame”. Here is code you require:

    public class VodaphoneExample {

    public static void main(String[] args) {

    WebDriver driver = new FirefoxDriver();

    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);




    Hope this will resolve your query.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.