Skip to content

Is there a shorter method in SeleniumBase to handle waiting for elements #2739

Answered by mdmintz
joako233 asked this question in Q&A
Discussion options

You must be logged in to vote

For returning a list of elements:

elements = driver.find_elements("h2")

(It autodetects between CSS and XPath)

For waiting on the first occurrence: driver.wait_for_element. Eg:

driver.wait_for_element("h2")

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@joako233
Comment options

@mdmintz
Comment options

Answer selected by mdmintz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants