Имеется вот такой код на Python:
from time import sleep
from selenium.webdriver.support import expected_conditions
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
option = webdriver.ChromeOptions()
option.add_argument("-incognito")
option.add_experimental_option("excludeSwitches", ['enable-automation'])
ser = Service("d:\\selenium\\chromedriver.exe")
browser = webdriver.Chrome(service=ser, options=option)
browser.get("https://docs.google.com/forms/d/e/1FAIpQLSdMxDauEatgZGCVoAG3XGuDaCFs9emRPSx9hLUkgtTOf47pqg/viewform")
textboxes = browser.find_elements(By.CLASS_NAME, "quantumWizTextinputPaperinputInput")
radiobuttons = browser.find_elements(By.CLASS_NAME, "docssharedWizToggleLabeledLabelWrapper")
checkboxes = browser.find_elements(By.CLASS_NAME, "quantumWizTogglePapercheckboxInnerBox")
submitbutton = browser.find_element(By.CLASS_NAME, "appsMaterialWizButtonPaperbuttonRipple")
sleep(3)
textboxes[0].send_keys("Hello World")
radiobuttons[2].click()
checkboxes[1].click()
submitbutton.click()
#button = WebDriverWait(browser, 10).until(expected_conditions.element_to_be_clickable(submitbutton))
#button.click()
При запуске выводит сообщение об ошибке:
Traceback (most recent call last):
File "D:\my\main.py", line 26, in <module>
submitbutton.click()
File "D:\my\venv\lib\site-packages\selenium\webdriver\remote\webelement.py", line 81, in click
self._execute(Command.CLICK_ELEMENT)
File "D:\my\venv\lib\site-packages\selenium\webdriver\remote\webelement.py", line 710, in _execute
return self._parent.execute(command, params)
File "D:\my\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 424, in execute
self.error_handler.check_response(response)
File "D:\my\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: chrome=97.0.4692.71)
Пробовал заменить
submitbutton.click()
на
button = WebDriverWait(browser, 10).until(expected_conditions.element_to_be_clickable(submitbutton))
button.click()
При этом ругается на таймаут:
Traceback (most recent call last):
File "D:\my\main.py", line 27, in <module>
button = WebDriverWait(browser, 10).until(expected_conditions.element_to_be_clickable(submitbutton))
File "D:\my\venv\lib\site-packages\selenium\webdriver\support\wait.py", line 89, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Подскажите, что делать, в какую сторону рыть?