I am trying to click the confidential button that appears in gmail with selenium, but I have not been able to click it.
driver.find_element_by_xpath('a3I').click()
And try click on button "Guardar" (save):
driver.find_element_by_xpath('Guardar').click()
How can solve this? Thanks very much
CodePudding user response:
You could try this:
//*[@id=":s2"]
If you press F12 on your keyboard and do a CTRL F and search by xpath (//), that will be your result. I searched it by the id of the element. Please let me know of it works for you.
The solution is:
composeEmail9 = driver.find_element_by_css_selector('div.buc.aaA.aMZ')
composeEmail9.click()
driver.find_element_by_xpath("//button[text()='Guardar']").click()