I need use selenium to located two elements. However, they both have same span class name. My code:
select_button = driver.find_elements_by_xpath("//span[@class='mat-button-wrapper']")
The issue is: I can this command 10 times, 6 times it locates my element, ( select button), but the other 4 times, it landed on the other button. How do I make sure it is 10 out of 10 times it will located my "select " button?