from selenium import webdriver
browser = webdriver.Firefox() # Opens Firefox webbrowser
browser.get('https://protonmail.com/') # Go to www.protonmail.com website
loginButton = browser.find_element_by_css_selector('#bs-example-navbar-collapse-1 > ul > li:nth-child(8) > a') # Finds login button
loginButton.click() # Clicks login button
browser.implicitly_wait(10) # wait until the site has fully loaded
usernameElem = browser.find_element_by_css_selector('#username') # Finds login element for email/username
usernameElem.send_keys('firstName.lastName@protonmail.com') # Enters email
passwordElem = browser.find_element_by_css_selector('#password') # Finds login element for password
passwordElem.send_keys('password') # Enters password # Enters password
This code crashes at the following line:
usernameElem.send_keys('firstName.lastName@protonmail.com')
The error message is:
selenium.common.exceptions.ElementNotInteractableException: Message: Element <input id="username" class="w100 inputform-field"> is not reachable by keyboard
I would like to understand, what the problem is first. I give the browser time to load. What is the reason for this error? And second: how can I solve the problem?