fbuetler/asvz-bot

selenium.common.exceptions.ElementNotInteractableException:

Closed this issue · 5 comments

I get the following error when running the script, does anyone know to happen what causes this issue?

File "C:\asvz-bot\src\asvz_bot.py", line 397, in __organisation_login driver.find_element(By.XPATH, "//input[@id='AsvzId']").send_keys(
File "C:\Python311\Lib\site-packages\selenium\webdriver\remote\webelement.py", line 230, in send_keys
self._execute(
File "C:\Python311\Lib\site-packages\selenium\webdriver\remote\webelement.py", line 403, in _execute
return self._parent.execute(command, params)
File "C:\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute
self.error_handler.check_response(response)
File "C:\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: headless chrome=102.0.5005.63)

At first glance, this looks like a timing issue. I suspect selenium tries to click on a button that is not yet loaded.

Can you reproduce this issue consistently? Or does it happen once in a while?

That would make sense or maybe a pop-up makes a button unklickable/unreachable.
I might find some time this week to debug/inspect the issue.

Unfortunately I can reproduce it consistently. I was never able to use the bot so far and tried multiple times.

You can delete the following line to see what the script is doing:

options.add_argument("--headless")

On https://github.com/fbuetler/asvz-bot/blob/master/src/asvz_bot.py#L210

Maybe that helps ;)

I had the same problem. The workaround worked for me! (with the disadvantage that you see Chrome opening and performing the steps).

Thank you for the nice script!

Sorry that I only had a look at it now...
After deleting the line to see what the script does, it worked for me as well. (Which is weird as it should only show what's done and not do anything differently)
I seemed that two tries were needed and the logs look like this:

2023-04-01 19:35:43 INFO     Valid login credentials
[40568:35060:0401/193543.570:ERROR:device_event_log_impl.cc(214)] [19:35:43.569] USB: usb_service_win.cc:415 Could not read device interface GUIDs: The system cannot find the file specified. (0x2)
[40568:35060:0401/193543.581:ERROR:device_event_log_impl.cc(214)] [19:35:43.581] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[40568:35060:0401/193543.582:ERROR:device_event_log_impl.cc(214)] [19:35:43.582] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[40568:35060:0401/193543.584:ERROR:device_event_log_impl.cc(214)] [19:35:43.583] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[40568:35060:0401/193543.686:ERROR:device_event_log_impl.cc(214)] [19:35:43.686] Bluetooth: bluetooth_adapter_winrt.cc:1164 RequestRadioAccessAsync failed: RadioAccessStatus::DeniedByUserWill not be able to change radio power.

DevTools listening on ws://xxx
[21848:34848:0401/193552.453:ERROR:device_event_log_impl.cc(214)] [19:35:52.453] USB: usb_service_win.cc:415 Could not read device interface GUIDs: The system cannot find the file specified. (0x2)
[21848:34848:0401/193552.464:ERROR:device_event_log_impl.cc(214)] [19:35:52.463] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[21848:34848:0401/193552.465:ERROR:device_event_log_impl.cc(214)] [19:35:52.464] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[21848:34848:0401/193552.466:ERROR:device_event_log_impl.cc(214)] [19:35:52.466] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[21848:34848:0401/193552.486:ERROR:device_event_log_impl.cc(214)] [19:35:52.486] Bluetooth: bluetooth_adapter_winrt.cc:1164 RequestRadioAccessAsync failed: RadioAccessStatus::DeniedByUserWill not be able to change radio power.
2023-04-01 19:35:55 INFO     Starting enrollment

Thanks a lot for the very cool script!