2

I am trying to click this button but the problem is that the button class there is used multiple times within the website, span class is also used multiple times.

Classes

Haven't been able to find a proper tutorial on how to do it.

Any help on how to target this button to be able to click it?

Luc
  • 23
  • 3

1 Answers1

0

If a class is used multiple times, you should use another method to get the element. In selenium there is lots of methods to locate html elements

Locating Elements

There are various strategies to locate elements in a page. You can use the most appropriate one for your case. Selenium provides the following methods to locate elements in a page:

find_element_by_id

find_element_by_name

find_element_by_xpath

find_element_by_link_text

find_element_by_partial_link_text

find_element_by_tag_name

find_element_by_class_name

find_element_by_css_selector

The relevant documentation is here.

Danizavtz
  • 3,166
  • 4
  • 24
  • 25