Automating Outlook

Ask general questions here.
reka
Posts: 5
Joined: Fri Feb 26, 2010 10:09 am

Automating Outlook

Post by reka » Fri Feb 26, 2010 10:18 am

Hi,

I'm new to Ranorex, currently evaluating if it would suit our needs to automate some tests in Outlook.
What I would like to do is open outlook, select a mailbox (from potentially multiple) and iterate through its folders, checking every mail in them - comparing mail content to a previously saved one.

I managed to get control for the folder tree and that works fine but I can't access the supergrid where I could select the mails. It shows up as Element 4704 in the Ranorex Spy, with no accessable elements/content

I have similar issues with the preview pane in outlook 2007 (2003 works ok) (_Wwg element)

Is there no alternative solution but mouse movement and relative coordinates?

Thanks!

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: Automating Outlook

Post by atom » Fri Feb 26, 2010 3:02 pm

hiya

what "flavor" does it come up as "win32" ?

Cheers

reka
Posts: 5
Joined: Fri Feb 26, 2010 10:09 am

Re: Automating Outlook

Post by reka » Fri Feb 26, 2010 4:11 pm

Hello,

Yes, it is

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Automating Outlook

Post by Support Team » Mon Mar 01, 2010 4:20 pm

Hi,

the problem you described is known by our Developement Team, but at the current version there is no way to get the SUPERGRID cells of Outlook, because it's identified as a single element.
But you can try this with image based recording or static mouse movements.

Regards,
Peter
Ranorex Support Team
.
Image

reka
Posts: 5
Joined: Fri Feb 26, 2010 10:09 am

Re: Automating Outlook

Post by reka » Wed Mar 17, 2010 2:00 pm

Hi,

The problem with the static mouse movement is, that I have no means to determine the height of a cell in pixels - it can change based on the system I'm using (and probably resolution and things like that)

We had an idea of taking a screenshot of the element, than move the selection down to the next mail and take another screenshot. Is there any way of determining the height of the pixel difference between these two captures?

Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Automating Outlook

Post by Support Team » Fri Mar 19, 2010 12:46 pm

Hi,

Why you are not using the keyboard actions something like:
Click the first item of the Inboxlist then go one item down. And save the content of the selected mail using the clipboard. Just select the whole text using the "Ctrl+A" shortcut, and copy everything with the "Ctrl+C" keyboard shortcut. And to click throw all items just code a "for" like
for (int i = 0; i < index; i++)
{
   Keyboard.Press(Keys.Down);
}
Regards,
Peter
Ranorex Support Team
.
Image

reka
Posts: 5
Joined: Fri Feb 26, 2010 10:09 am

Re: Automating Outlook

Post by reka » Wed Mar 24, 2010 2:09 pm

Hi,

The problem with that is that I have to test the mouse and keyboard action separately - the test is for an outlook add-in and I have to make sure that it loads the e-mail correctly in both ways

In any case, mouse movement doesn't seem to work on a virtual machine properly for some reason (sometimes does, sometimes doesn't) so I think I'll have to postpone this for a while

reiniuny
Posts: 23
Joined: Thu Jul 04, 2013 10:48 am

Re: Automating Outlook

Post by reiniuny » Thu Jul 25, 2013 6:38 am

Are there any news on this topic?

I'd like to use Ranorex 4.0.5 to select a specific E-Mail in Outlook 2010. I then also would like to validate the text of an email, but at the moment it doesn't seem to be possible to get the content of an email in ranorex to validate it.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Automating Outlook

Post by Support Team » Fri Jul 26, 2013 2:53 pm

Hi,

Could you please post a Ranorex snapshot of the content of the email?
Following link will show you how to generate a snapshot file: Creating Ranorex Snapshot Files.

If you track (with Ranorex Spy) the content of the email you should see an element named "element[@class='_WwB']" and if you expand the node you should see an element named "worddoc[@name='Document209']". This element/class name has to be added to the GDI capture list in order to enable Ranorex to track the content of the email.
After you added it you should be able to see the RawText elements in Spy.

Regards,
Markus
.
Image

reiniuny
Posts: 23
Joined: Thu Jul 04, 2013 10:48 am

Re: Automating Outlook

Post by reiniuny » Mon Jul 29, 2013 6:06 am

Thanks for your reply, with the GDI Capturing I'm able to get the (visible) text of the E-Mail.

Flash05
Posts: 12
Joined: Tue Jan 28, 2014 8:27 am

Re: Automating Outlook

Post by Flash05 » Fri Jun 13, 2014 10:12 am

Hello,

I can't get the content of a mail in outlook 2013. I also activated GDI Capture List, but there is no content as rawtext?
Attachments
outlook2013_mail_content.rxsnp
(113.07 KiB) Downloaded 114 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Automating Outlook

Post by Support Team » Fri Jun 20, 2014 2:20 pm

Hi,

Thanks for sending us the snapshot!

Unfortunately not all versions of Outlook are supported equally well.
Currently you need to use a workaround to be able to identify the content of an email in Outlook 2013.

You can for instance use image search, you could also copy and paste the text to another editor which can be accessed with Ranorex or even better you could copy the text to clipboard. You can get the text of the current email item by copying to the clipboard and getting the text from there by using the following method:
String content = System.Windows.Forms.Clipboard.GetText();
Thanks for your understanding!

Regards,
Markus
.
Image