Skip to main content
deleted 5 characters in body; edited tags
Source Link
Mate Mrše
  • 4.1k
  • 4
  • 24
  • 51

When you use find_by_elementsit it returns a list of all the elements which correspond to ana selector, xpath, class, id  , etc...

However, I wanted to know if it's possible to extract an element of this list in Python to click on it or at least to try to click on each element of this list.

To explain you my issue.: I have an xpath which points to two elements, these two elements are exactly the same thing but one is not visible and the other one is visible.

But if I use the regular find_by_element, it points to the invisible one  , so I have an error...

I would like to use this list, to reach the other one and finally be able to click on this element.

When you use find_by_elementsit returns a list of all the elements which correspond to an selector, xpath, class, id  , etc...

However I wanted to know if it's possible to extract an element of this list in Python to click on it or at least to try to click on each element of this list.

To explain you my issue. I have an xpath which points to two elements, these two elements are exactly the same thing but one is not visible and the other one is visible.

But if I use the regular find_by_element, it points to the invisible one  , so I have an error...

I would like to use this list, to reach the other one and finally be able to click on this element.

When you use find_by_elements it returns a list of all the elements which correspond to a selector, xpath, class, id, etc...

However, I wanted to know if it's possible to extract an element of this list in Python to click on it or at least to try to click on each element of this list.

To explain my issue: I have an xpath which points to two elements, these two elements are exactly the same thing but one is not visible and the other one is visible.

But if I use the regular find_by_element, it points to the invisible one, so I have an error...

I would like to use this list, to reach the other one and finally be able to click on this element.

Source Link
LeBrequin
  • 437
  • 2
  • 7
  • 16

Question about find_by_elements

When you use find_by_elementsit returns a list of all the elements which correspond to an selector, xpath, class, id , etc...

However I wanted to know if it's possible to extract an element of this list in Python to click on it or at least to try to click on each element of this list.

To explain you my issue. I have an xpath which points to two elements, these two elements are exactly the same thing but one is not visible and the other one is visible.

But if I use the regular find_by_element, it points to the invisible one , so I have an error...

I would like to use this list, to reach the other one and finally be able to click on this element.