Click button by find_element_by_class_name not working python selenium webdriver NOT working
You should use find_elements
for finding all elements with same classTry this to get all elements:
elements = driver.find_elements_by_class_name("mn-person-card__person-btn-ext.button-secondary-medium")
then use a for loop to click each of them. For example:
for e in elements: e.click()
The way you are trying to use find_element_by_class_name
locator is not correct as this locator doesn't support compound classes within.
You need to use either xpath
or cssSelector
if class attribute have more then one class name :
driver.find_element_by_xpath("//button[@class='mn-person-card__person-btn-ext button-secondary-medium']").click()