dimanche 4 août 2019

How to fix "element not interactable" (selenium py)

When my bot is trying to clear the input, i got an error

import codes

with open('list.txt', 'r') as f: for line in f:

    #search input
    code_input = checker.find_element_by_id('input')
    code_input.send_keys(line)
    checker.find_element_by_class_name('button').click()
    code_input.clear()

Traceback (most recent call last): File "C:\Users\admin\Desktop\Checker\script.py", line 52, in checker.find_element_by_class_name('a-button-inner').click() File "C:\Program Files\Python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click self._execute(Command.CLICK_ELEMENT) File "C:\Program Files\Python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute return self._parent.execute(command, params) File "C:\Program Files\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Program Files\Python37\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=76.0.3809.87)




Aucun commentaire:

Enregistrer un commentaire