Answer the question
In order to leave comments, you need to log in
Why doesn't except work?
Hey! I do not quite understand why an try
exception is thrown from the function in the block.
try:
while True:
# цикл имеет условие выхода, здесь убрал для сокращения кода
wait.until(
EC.presence_of_element_located(
(By.CLASS_NAME, "demoAuth__item-image")
)
).click()
except AssertionError as e:
print(e, "Элемент не обнаружен на странице")
except
After waiting, it crashes TimeoutException
. I can't figure out why it doesn't go to except
? Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question