0

How can I get in "gmail.com" website when input email after press next button id for selenium web driver? Does not exist. only exists <div class="ZFr60d CeoRYc"></div> this. How can I find ID of next button?

automation Gmail login using selenium webdriver in java in this link answer is id = identifierNext for next button. But how can I know it is ID?

  • If you `F12` on that element, you'll get the `span` tag in DevTools. When you trace its ancestor, you'll find a `div` with `role='button'` and with an `id`. This is your required `id`. – hiren Jan 29 '18 at 10:03
  • Did any answers mentioned below solve your issue? – hiren Feb 09 '18 at 05:59

3 Answers3

1

You can also use xpath:

"//span[contains(text(), 'Next')]"
Anand
  • 1,899
  • 1
  • 13
  • 23
0

There is an id attribute for the Next button. You can use xpath like .//div[@role='button' and @id='identifierNext']. Hope it helps.

hiren
  • 1,067
  • 1
  • 9
  • 16
0

This is the html tag for next button by id:

 driver.find_element_by_id("identifierNext").click()
ashishmishra
  • 363
  • 2
  • 14