Home > front end >  How to click the button "Change confidential mode" in gmail? Python Selenium
How to click the button "Change confidential mode" in gmail? Python Selenium

Time:12-11

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()

enter image description here

And try click on button "Guardar" (save):

driver.find_element_by_xpath('Guardar').click()

enter image description here

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()
  • Related