I was trying to login to Gmail using selenium. I got the ID element, next button element but I am unable to attain password element.
This is the code snippet.
browser = webdriver.Firefox(executable_path = '/Users/ritikjangir/Downloads/geckodriver')
browser.get('http://gmail.com')
emailE = browser.find_element_by_id('identifierId')
emailE.send_keys(email)
nextE = browser.find_element_by_class_name('CwaK9')
nextE.click()
passE = browser.find_element_by_name('password')
passE.send_keys(password)
Email and password are variables that store my id and password as a string.
This gives the following error:
============ RESTART: /Users/ritikjangir/Documents/LineEmailer.py ============ Traceback (most recent call last): File "/Users/ritikjangir/Documents/LineEmailer.py", line 26, in passE.send_keys(password) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 479, in send_keys 'value': keys_to_typing(value)}) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute return self._parent.execute(command, params) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: Element is not reachable by keyboard
and the worst part is, it ran once.
Enter password element's attr. are:
input type="password" class="whsOnd zHQkBf" jsname="YPqjbf" autocomplete="current-password" spellcheck="false" tabindex="0" aria-label="Enter your password" name="password" autocapitalize="off" autocorrect="off" dir="ltr" data-initial-dir="ltr" data-initial-value="">