This is a migrated thread and some comments may be shown as answers.

Verify E-mail

6 Answers 266 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nate
Top achievements
Rank 1
Nate asked on 11 Feb 2011, 07:42 PM
Hello,
        I am wondering if there is an easy way to check an e-mail account to see if a particular e-mail is received after an action is performed on a website. Do you guys have any suggestions in how to accomplish this?

6 Answers, 1 is accepted

Sort by
0
Accepted
Stoich
Telerik team
answered on 14 Feb 2011, 01:25 PM
Hello Nate,
      WebUI Test Studio doesn't have features specifically related to this.
The most obvious way to do it would be to record a test that logs on and checks the inbox (the way a user would) and then add this test as a TestAsStep to other test.

That being said WebUI Test Studio will allow you to write your own custom methods and also import additional assemblies. I'm confident that there's a way to directly communicate with your mail server but you'll need to add the necessary assemblies and the logic use them yourself.

Here's a KB article that describes how you add Assembly references in QA edition:
http://www.telerik.com/automated-testing-tools/support/kb/project-configuration/adding-assembly-references-in-qa-edition.aspx

Please post your solution once you're done - I'm sure there are other users that will be interested in seeing it.

All the best,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Nate
Top achievements
Rank 1
answered on 14 Feb 2011, 10:41 PM
Stoich,
         Thanks for the response. Your suggestions are the two ideas I had regarding the issue; I just wanted to see if there was an easier way. I'll have to do some additional research into which method would be better for go with. Obviously the former would require web-access to the e-mail account (using gmail, yahoo, or OWA). If it is the latter it will take me a bit to implement. I'll post up an answer once I get around to it.
0
Roberto
Top achievements
Rank 1
answered on 23 Aug 2012, 03:26 PM
Hi,

I know this is an old thread.  How did you implement your solution?  I am having a similar scenario:

1) Create an account for user
2) Email is sent to user with login user id and password

I can only manually go in to the email account and retrieve the temporary password to change it.  I'm not sure how to automate it yet.  So far I am trying with gmail account but the element for the email (to read the email content) is different each time, it is not straightforward to do.

Any help is appreciated.

Thanks,

-Roberto
0
Plamen
Telerik team
answered on 27 Aug 2012, 01:06 PM
Hello Roberto,

The rows of the table that contains the emails are dynamically generated(every new email generates a new row at the beginning of the table). To work with a dynamically generated HTML Table you need a coded solution. See this article for an example.

Here's a sample code against gmail:
Browser gFrame = ActiveBrowser.Frames.ById("canvas_frame");
 
HtmlTable gmailTable = gFrame.Find.ById<HtmlTable>(":ov");
Assert.IsNotNull(gmailTable);
 
gmailTable.BodyRows.FirstOrDefault().MouseClick();

This will always click on the first row from the table(last received email). Here's a video demonstrating the execution.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Nate
Top achievements
Rank 1
answered on 31 Jul 2013, 07:20 PM
I'm just now looking back on this thread. What I did is write an assembly that is a POP client. Once I wrote the assembly I imported it into Test Studio and called the classes in that assembly to read the e-mail. A rather time intensive task but it has been working reliably for 2 years now.
0
Velin Koychev
Telerik team
answered on 02 Aug 2013, 08:13 AM
Hi Nate,

Thank you for sharing your experience with us. 

It is great to hear that you've been able to write this assembly on your own, because I am sure it takes some time and research to do it. 
 
Regards,
Velin Koychev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Nate
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Nate
Top achievements
Rank 1
Roberto
Top achievements
Rank 1
Plamen
Telerik team
Velin Koychev
Telerik team
Share this question
or