How to click button selenium python

How to click button selenium python?

Add New

self.driver.find_element_by_xpath("//button[@id=‘sample_editable_1_new’]").click()

Got Error : raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {“method”:“xpath”,“selector”:"//button[@id=‘sample_editable_1_new’]"}
(Session info: chrome=86.0.4240.75)

I think this error is very descriptive.

1 Like