Skip to main content
3 of 3
Moved erroneous answer to question
Kate Paulk
  • 31.5k
  • 8
  • 55
  • 109

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.)

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