There is a multiple way to click on button you can try any of one
By using Xpath without wait:
try:
driver.find_element_by_xpath('your Xpath').click()
print('Button clicked ok')
except Exception as e:
print('Error in clicking BTN : ' + str(e))
By using Xpath with wait:
try:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable(
(By.XPATH, 'your Xpath'))).click()
print('Button clicked ok')
except Exception as e:
print('Error in clicking BTN : ' + str(e))
By using Css selector:
try:
driver.find_element_by_css_selector('a._3m1z').click()
print('Button clicked ok')
except Exception as e:
print('Error in clicking BTN : ' + str(e))
By using css selector with wait:
try:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable(
(By.CSS_SELECTOR, 'a._3m1z'))).click()
print('Button clicked ok')
except Exception as e:
print('Error in clicking BTN : ' + str(e))
you can copy xpath by right click on element >>copy>>xpath