Click a Button with Python Using Selenium

Viewed 36

I have tried all the grabbing methods and I was not able to click on Not Now. Xpath never worked, CSS selector..etc enter image description here

1 Answers

You can try to click by text in the button, something like this:

driver.find_element_by_xpath("//button[contains(string(.),'Not Now']").click()
Related