The GUI as below: GUI. HTML content as below: HTML. I'm trying to use python selenium to click the "OK" button in many ways: For example:
driver.switch_to_alert()
driver.find_element_by_id("YesBtn").click()
or
driver.switch_to_alert()
driver.find_element_by_xpath("//div[@id='YesBtn']").click()
or
driver.switch_to_alert()
driver.find_element_by_xpath("//input[@id='YesBtn']/html/body/div/div/div/div/div[3]").click()
But I always get error message like:
Unable to locate element: {"method":"id","selector":"YesBtn"}
Please help in this matter