If an xpath corresponds to multiple elements on a page, how do you know the number of those elements #1401
Answered
by
mdmintz
chenqinggang001
asked this question in
Q&A
|
I want to know the number of elements and click on them |
Answered by
mdmintz
Jul 10, 2022
Replies: 3 comments 2 replies
|
Example with Find the number of
To click all the buttons:
|
0 replies
Answer selected by
mdmintz
|
Thanks |
0 replies
|
I need to click the buttons in order, The way I do it now is I get the length and I concatenate the elements in order, Is there a more elegant way to do it Because I do something after every click, this method is not for me |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example with
button:Find the number of
buttonelements on a page:len(self.find_visible_elements("//button"))To click all the buttons:
self.click_visible_elements("//button")