Answer the question
In order to leave comments, you need to log in
How to set a condition for the existence of a button on the page at the time of checking the condition?
I can't think of a condition that, if the desired button is visible, will
return
True :
The option with waiting for this button to appear (the usual WebDriverWait or any other method that can reduce the speed of the script by normal waiting) is of less priority, because I already wrote this one myself.
In a loop from i to 30, a check is made to see if this button is in the visibility zone, if so, perform an action.
if browser_branch.find_element_by_xpath("//div[@class='_action']").is_displayed() == True:
print("Найден активный элемент во вторичном окне")
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