Bilal Shahzad
Bilal Shahzad

Reputation: 1

Email verification from gmail account in selenium webdriver (JAVA)

I am very beginner to Selenium, java and SQA automation. I wanted to do automated EMAIL VERIFICATION FROM GMAIL ACCOUNT. Help me please..

For this I found & followed a tutorial but failed. I don't know what happened to my code even I can't understand the error.

I followed this link step by step: http://www.abodeqa.com/email-verification-gmail-account-selenium-webdriver-java/

Here is the whole code, which I tried. http://www.abodeqa.com/email-verification-gmail-account-selenium-webdriver-java/

I found too many errors but I am including some main & top errors at following:

Could not connect to the message store.

javax.mail.MessagingException: Connection dropped by server?; nested exception is: java.io.IOException: Connection dropped by server?

Also, Being a newbie I feel this tutorial too much difficult. Can anyone please share some other easy & brief tutorials with me ? Please.. Thanks in advance!

Upvotes: 0

Views: 1668

Answers (1)

Carlos
Carlos

Reputation: 1450

To lookup emails on a gmail account I recommend you use the java gmail api. Tutorial here: https://developers.google.com/gmail/api/quickstart/java

You should be good with that tutorial, the sample code works (you will need to setup correctly your gmail account to permit access and also create the corresponding credentials).

Probably you will need to call a couple of methods, one to search for the email you are looking for, and then another to get the detail of it.

Full docs of library here: https://developers.google.com/resources/api-libraries/documentation/gmail/v1/java/latest/

Upvotes: 1

Related Questions