I am trying to login to this [website][1] using selenium and trying to scrape all the data available. However I am facing issues while logging in to the account. The error reads as:
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
By looking at the stacktrace, I came to know that there's a problem while sending the login email..here is the complete stacktrace.
browser.find_element_by_id('username').send_keys('[email protected]')
File "F:\technophile\venv\lib\site-packages\selenium\webdriver\remote\webelement.py", line 477, in send_keys
self._execute(Command.SEND_KEYS_TO_ELEMENT,
File "technophile\venv\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "F:\technophile\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "F:\technophile\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: chrome=92.0.4515.159)
And here is my code for the same:
websites = ['https://www.spacresearch.com/symbol?s=live-deal§or=&geography=']
data = []
for live_deals in websites:
browser.get(live_deals)
#time.sleep(1)
browser.find_element_by_id('username').send_keys('[email protected]')
browser.find_element_by_id('password').send_keys('abc@123%$')
browser.find_element_by_xpath('/html/body/div[1]/div[1]/form/button').send_keys(Keys.ENTER)
time.sleep(2)
#rest of the code
I've faced this error a couple of times and I've solved it using webriverWait..however this time, it did not solve the issue so I tried introducing sleep time as well. but that did not work as well. I tried something like this:
# wait =WebDriverWait(browser, 10)
# wait.until(EC.visibility_of_element_located((By.ID, 'username')))
# wait.until(EC.visibility_of_element_located((By.ID, 'password')))
What exactly is the cause of error? Please let me know! Thanks alot for your help in advance. [1]: https://www.spacresearch.com/symbol?s=live-deal§or=&geography=