Record confirmation email - selenium

Using Selenium IDE(HTML), I'm recording an registering under one website, and a confirmation email will be sent when the sign up is successful.
This confirmation message will be sent to my gmail. I was recording to check in my gmail using Selenium-Ide but I can't record.So I want to know how to record in gmail using selenium?

Well where is the email going?
Gmail?
Yahoo?
Some other web page?
The above four questions is important! Because, let's say you want to check confirmation email to your gmail if so you need to go to gmail url and you need to record Login and assert things.
I will be show you a example with gmail.
I want to check in my gmail if so
command open
Target https://mail.google.com/
this one need to add to your test. Because of you need to go to new page so you need to use open command.

Have a look at PutsBox. You can send an email to whatever-you-want#putsbox.com, wait for a few seconds (SMTP stuff ins't instantaneous) then check your email via http://preview.putsbox.com/p/whatever-you-want/last.
This post tutorial shows some examples.

Related

How can I find telegram user by id

I'm using telegram bot and can get user id from incoming message.
Sometimes I want to find users who communicate with telegram bot and write them message by myself.
I have only user id and have not some additional information about the user.
Can I somehow find users by id or anonimity with only id available is by design?
At least what I've been using...
Program your bot to send you a message with link to that user.
This can be done by using link in your message (must be used as message entity or inline keyboard button):
tg://user?id=<user_id>
Or in case you are using MarkdownV2 for formatting
[inline mention of a user](tg://user?id=<user_id>)
Then, by clicking on that link, you will open a user profile, where you can message your target.
Note, user can change his privacy settings, and disable mentions. In this case these links will not work.

Registration process with mail confirmation in Selenium

I have question about registration process in selenium. Which way is best to do it if we must click activation link in received email? Which method is used by commercial QA teams?
I am thinking about this problem and I want to use sites like '10 minutes mail', is that a good way?
There's any other options? I can't use same mail multiple times.
Creating new 'true' mail every time will be difficult and will take too much time, there will be captcha problems etc
you can use a mailbox as registration mail, which supply API to read mail content in inbox, rather than only can from UI. Therefore you can easier to get the activation link and send http request to simulate click activation link.
Try using regular gmail account, there is a trick with '+' character and You can re-use multiple times, and mail is getting received on same account.
So You can use like this: open gmail with desired address, eg. address testmail#gmail.com, so You can reuse it in following iterations:
testmail+1#gmail.com
testmail+2#gmail.com
...
testmail+test1#gmail.com
testmail+test2#gmail.com
and so You can have...lot of accounts. I've used this method and its quite sufficient.

Mail Notification using Selenium

I have a doubt like ... Can we use mails in automation(selenium).For ex, I am submitting a form , can we use selenium
- to send email
- to verify whether email has been received by that recepient and can we process that through selenium
I have read like we should not automate with gmail as per aggreement.I am not sure about this .
It's possible. You can use Java Mail API to achieve this.
Otherwise use public email systems like Mailinator. By using the API, we can fetch email content. Please read API docs for more info.
Similar question asked before.

How can i test using multiple users , a sign up page with OTP using jmeter

My website has an OTP authentication at the time of registering to the website. I need to pass the otp that is send to both email id and mobile number into the next page, register and do rest steps in the website. I need to do it with 500 users. Please help me, if there is any solutions
You can use JMeter's Mail Reader sampler (maybe in combination with Regular Expression Extractor) to get the OTP from the email message generated by your system, store it into a JMeter Variable and use in login request.
See How to Create a JMeter Script to Check Email During Registration AND Grab the Confirmation URL article for detailed steps.
If you need do to it for 500 users I guess you'll need to have 500 email accounts, so you might need to use CSV Data Set Config to read keep email/password pairs from .csv file.

Disallowing link from opening in Forward email

we have a use-case wherein a notification email is sent out in response to some postings on forum. This notification emails carry a AHREF link which basically allows to launch the post page from the email itself. Additionally, these links carry an authentication token so that the user don't have to sign in when opening the page. This works fine in the normal use case, but in the scenario when the original recipient forwards the email to some other account we are not sure how we identify that the link is opened from forwarded email address. Can somebody provide some insight ?
There is principally no way for you to detect that a link was clicked in an email that was forwarded vs. an email that you sent directly to someone.
Do not put an authentication bypass in the link if the need to secure your content outweighs the need for user friendliness.
You can weigh allowing the user, once they log in, to set a persistent authentication cookie in the browser they logged in from. That way, if they click a link in an email and that cookie is set, they can get directly into the website. StackOverflow.com works that way, which is convenient and the downside risk is not too great. Fortunately my bank does not work that way. The potential for loss is much greater with home banking.