Guilherme Lima Guilherme Lima - 1 year ago 99
Python Question

ElementNotVisibleException Selenium

Estou tentando fazer o login no site
I trying to make a login with selenium on

i trying this:

def setUp(self):

self.driver = webdriver.Chrome(executable_path='C:\_workspace\projects\Packtpub\chromedriver')
time.sleep(5) # Let the user actually see something!

def test_login(self):

driver = self.driver

login1 = driver.find_element_by_id("email-wrapper")

so return this error:

ElementNotVisibleException: Message: element not visible

I don't know why

Answer Source

The problem is that there are 2 elements with id="email" on page (try driver.find_elements_by_id("email") and you will see it). So you should try

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download