Skip to main content
Moved erroneous answer to question
Source Link
Kate Paulk
  • 31.5k
  • 8
  • 55
  • 109
WebElement username = driver.findElement(By.cssSelector("input[name='username']"));

The statement mentioned above was working before but right now concerned element can't be captured and error message including " Unable to find element " is popping up. What might be the reason ?

Scenario: It's login page by typing username and password.
browser: IE explorer 11 (code should be run in that browser btw.)

UPDATE: I dont know why but when I changed my connection to wifi from lan, it worked. Why would that change anything?

WebElement username = driver.findElement(By.cssSelector("input[name='username']"));

The statement mentioned above was working before but right now concerned element can't be captured and error message including " Unable to find element " is popping up. What might be the reason ?

Scenario: It's login page by typing username and password.
browser: IE explorer 11 (code should be run in that browser btw.)

WebElement username = driver.findElement(By.cssSelector("input[name='username']"));

The statement mentioned above was working before but right now concerned element can't be captured and error message including " Unable to find element " is popping up. What might be the reason ?

Scenario: It's login page by typing username and password.
browser: IE explorer 11 (code should be run in that browser btw.)

UPDATE: I dont know why but when I changed my connection to wifi from lan, it worked. Why would that change anything?

WebElement username = driver.findElement(By.cssSelector("input[name='username']"));

WebElement username = driver.findElement(By.cssSelector("input[name='username']"));

The statement mentioned above was working before but right now concerned element can't be captured and error message including " Unable to find elementUnable to find element " is popping up. What might be the reason ?

Scenario:Scenario: It's login page by typing username and password. 
browser:browser: IE explorer 11 (code should be run in that browser btw.)

WebElement username = driver.findElement(By.cssSelector("input[name='username']"));

The statement mentioned above was working before but right now concerned element can't be captured and error message including " Unable to find element " is popping up. What might be the reason ?

Scenario: It's login page by typing username and password. browser: IE explorer 11 (code should be run in that browser btw.)

WebElement username = driver.findElement(By.cssSelector("input[name='username']"));

The statement mentioned above was working before but right now concerned element can't be captured and error message including " Unable to find element " is popping up. What might be the reason ?

Scenario: It's login page by typing username and password. 
browser: IE explorer 11 (code should be run in that browser btw.)

Source Link

Unable to find element with css selector == input[name='username']

WebElement username = driver.findElement(By.cssSelector("input[name='username']"));

The statement mentioned above was working before but right now concerned element can't be captured and error message including " Unable to find element " is popping up. What might be the reason ?

Scenario: It's login page by typing username and password. browser: IE explorer 11 (code should be run in that browser btw.)