Skip to content

How to use find_element, get_attribute and get_text over iteration of elements after finding the elements? #3206

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

You must be logged in to vote

When you find elements via find_elements, those are Selenium WebElement objects (not SeleniumBase objects). You have to use the regular Selenium API if you have a Selenium WebElement object, which doesn't autodetect the selector type from the selector. In other words, you need to include the by arg with your calls, eg: by="css selector.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@breadacker
Comment options

Answer selected by mdmintz
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