def get_clickable_element(driver, locator_strategy, locator, inactivity_sign, delay=60, logging=True):
try:
wait_for_page_inactivity(driver, inactivity_sign)
WebDriverWait(driver, delay).until(EC.element_to_be_clickable((locator_strategy, locator)))
element = driver.find_element(locator_strategy, locator)
return element
except TimeoutException as err:
if logging:
print("Элемент c " + locator + " не стал активен в течение " + str(delay) + " сек.")
print(err)
raise
Не могу поймать данный экспшен, есть идеи?
Получаю в ответ падающий тест
File "myPath", line 39, in get_clickable_element
WebDriverWait(driver, delay).until(EC.element_to_be_clickable((locator_strategy, locator)))
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: