Answer the question
In order to leave comments, you need to log in
How to check the visibility of a page element?
Good afternoon! I will not dissemble, they gave a test task, write an autotest for Yandex. One point that raised the question is:
check for the appearance of the search box hint list popup.
My thoughts are:
-check by element id (the list has no id)
-check the suggest2 class (but the element is hidden in the DOM from the very beginning)
-check the presence of the element in the DOM and check it for the presence of the popup_visibility_visibale class The
question is, having received the element
[code]
Try:
browser.find_element_by_class('suggest2')
browser.find_element_by_class('popup_visibility_visibale')
Except:
print('element hidden')
[/code]
How to check element for another class?
Answer the question
In order to leave comments, you need to log in
It is better to write a selector that will find the given list regardless of its visibility and apply the isDisplayd method to this object
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question