2
link = div.find_element_by_tag_name('a')

How can I use this in the statement

link = WebDriverWait(driver, 10).until(EC.visibility_of_element_located(div.find_element_by_tag_name('a')))

This, doesn't work.

1 Answer 1

2

visibility_of()

visibility_of() is the expectation for checking that an element, known to be present on the DOM of a page, is visible. Visibility means that the element is not only displayed but also has a height and width that is greater than 0. element is the WebElement returns the (same) WebElement once it is visible.

selenium.webdriver.support.expected_conditions.visibility_of(element)

As visibility_of() takes an element as an argument, you can use the following Locator Strategy:

link = WebDriverWait(driver, 10).until(EC.visibility_of(div.find_element_by_tag_name('a')))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.