If an xpath corresponds to multiple elements on a page, how do you know the number of those elements #1401
-
|
I want to know the number of elements and click on them |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
Example with Find the number of
To click all the buttons:
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks |
Beta Was this translation helpful? Give feedback.
-
|
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 |
Beta Was this translation helpful? Give feedback.
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")