Objective: To loop over Span items (inform of buttons) on a Web Page and get corresponding href values. This page can have multiple buttons kind of elements and its dynamic and will have value from 1 to n.
Input html code:
and this class='mb-text' values varies from 1 to n.
So Now I need to find if this span class exist and if exist, then loop through it and get all href related to those
The below statements were not able to locate intended elements returned empty list
elements1 = driver.find_elements_by_xpath("(//span[contains(@class,'mb-text')])")
elements1 = driver.find_elements_by_css_selector('maxbutton-1 maxbutton maxbutton-download-link')
Please suggest
