Email verification from gmail account in selenium webdriver (JAVA) - 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!

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/

Related

how to use Frida-Gadget to MITM in android

Hi i like to track all the get requests of a website i browse.
lets assume im using an app in that app there is a WebView that leads to a website.
the website is doing get requests.
the website has SSL pinning.
i like to know what are those get requests that the website is doing.
During a google research I found that Frida help me bypass the SSL pinning However, Frida must be used on Rooted devices. I need for not rooted devices.
It comes to my attention that Frida-Gadget can do that for me.
is there any explicit guide to do so?
my goal is simple to go to a SSL website using my phone and track all the "get" request that the website is doing.
Thank you !

BillingClient: getSkuDetails() failed. Response code: 6

I've integrated Google inApp billing in my android App. It was working fine, But now I noticed that on one device its always returning BILLING_RESPONSE_RESULT_ERROR response. In Logcat it shows following error.
BillingClient: getSkuDetails() failed. Response code: 6
I couldn't find any help regarding this issue, Can someone help me what could be the possible problems and solution. Thanks.
This generally happens when you have signed out from Google account in your device. All you need to do is just sign in again, if needed do a full restart.
Well, my situation is the connection between my device and google's servers is unstable.Try to open the GooglePlay,and check if the connection is healthy.And it wroks.
In my case, this happened when a new app I submitted was in "Draft" status, not yet approved by Google. Just wait until it's approved and payments will start to work.
An alternative would be to submit it in the internal track and add the email for you play account as a test user.

Retrieve email from Postfix using Java

I'm trying to find an example on how to implement a Java client (using javamail perhaps) that retrieves emails from postfix, but unfortunately I haven't found anything usable in 8 hours.
I already managed to make an smtp client to send email to my postfix server running on localhost but still no success on getting that mail I sent back. With the imap client I always get some problems with the store and get connection refused.
Any suggestion?
Did you find the JavaMail FAQ? There's lots of tips there, including tips on how to debug and what additional information we would need to see to help you figure out what's wrong. So far all you've told us is that something's not working. Without more details, we can't offer more than general suggestions.

Android L2TP connection to server

This is my letter of hope. I'm using android 4.* to create a l2tp connection to the server. The problem is in authorization. I have a server key , user login and password. I search any solution along the internet, not for android only but for java at all, and didnt find any code sample for start. I have no idea how I can authorize on server. ToyVpn in android samples didnt help, its just sample of regular connection(without any authorization). Please, somebody, help! I'll be grateful for for any useful information in this question.

Sending emails from local host - Play Framework

Does anybody know the smtp settings that need to be applied within the application.conf file of a Play Framework project for sending emails on localhost?
During my unit testing I am getting the error:
A play.exceptions.MailException has been caught, Cannot send email
The developers at Play have made sending emails so easy that the only way I could be messing up is with my settings in the config file.
I have tried just using:
mail.smtp=mock
And I tried commenting out the line above and using:
mail.smtp.host=127.0.0.1
Neither of these two approaches work. I understand that this is probably a very noob question, but I have never really dealt with setting up emails before - so I am grateful for any help that can be contributed.
If it is the case that I am unable to send email as Play would not work as an SMTP server, is there any way that I can use mail.smtp=mock to 'mock send' an email and allow my tests to pass?
Useful Link
This is a link to the Play documentation for sending emails
To better diagnose the problem, you can use the following setting (in application.conf) to give more details of the email sending process.
mail.debug=true
However, for testing purposes, I have found using GMail the easiest method for sending emails.
The configuration (again in application.conf) is...
mail.smtp.host=smtp.gmail.com
mail.smtp.user=yourGmailLogin
mail.smtp.pass=yourGmailPassword
mail.smtp.channel=ssl
For full details of all the configurations, the Play Framework page has lots of information on how to do this.
http://www.playframework.org/documentation/1.2.2/emails
I use 1.2.4. (haven't ported yet...)
There are various reasons why play.mvc.Mailer.send() may fail, however the true reason is suppressed if you look at the first level of the exception thrown since what gets thrown is (play.mvc.Mailer.java:349):
throw new MailException("Cannot send email", ex);
play.exceptions.MailException inherits from java.lang.RuntimeException. The real exception, ex, is set as the cause.
I'd recommend taking a look at the cause field. Example:
try {
Future<Boolean> future = play.mvc.Mailer.send(...);
} catch(MailException me) {
System.out.println(me.getCause().getMessage());
}
This may print out something more useful.
For future developers I use Play2.1 on Mac OSX, this is my mail configuration to send to localhost...
host=localhost
port=1025
user="root#localhost"
from="root#localhost"
using MockSMTP application available at the Mac store http://mocksmtpapp.com/
Also using typesafe plugin
https://github.com/typesafehub/play-plugins/tree/master/mailer
I hope this can help someone in the future.

Categories

Resources