Need help with Selenium WebDriver "getClass" object

22 views
Skip to first unread message

AutoEngr

unread,
Jun 6, 2017, 2:18:32 PM6/6/17
to Selenium Users
Hello Selenium Gurus....
I'm trying to write a Selenium WebDriver script for the new "Gmail" login page... I'm grasping it it so far, but got stuck on one section.. The "Next" button is not a "findElement" object, so it's not as easy as the old login, and no one created a script, or video on this yet.. SOOO.... If you can look at the attached image, and see if you can help me, I would be SOOOO Thankful!
PS - I'm not a developer.. so... make your response "dummy-proof" for me.. Thanks!
AutoEngr-
getClassIssue.jpg

Monika Singhal

unread,
Jun 7, 2017, 12:01:28 AM6/7/17
to Selenium Users
Hi,

You can locate the "Next" button of Gmail by its ID. 

driver.findElement(By.id("identifierNext")).click();


Thanks& Regards,
Monika




Thanks & Regards,
Monika

Monika Singhal

unread,
Jun 7, 2017, 12:20:27 AM6/7/17
to Selenium Users
Hi,

I have just tried and it is working.


System.setProperty("webdriver.gecko.driver", "src/geckodriver");

WebDriver driver = new FirefoxDriver(); 

driver.get("https://mail.google.com");

driver.findElement(By.id("identifierId")).sendKeys("your email id here");

driver.findElement(By.id("identifierNext")).click();



Thanks & Regards,
Monika

Marcy Lin

unread,
Jun 7, 2017, 12:30:38 AM6/7/17
to seleniu...@googlegroups.com
Hummmm... I will give it another try. 
Thank you -

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/yn1FwX1wn-o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8da12c9d-c9f8-4756-a654-f7a0132894ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages