Automating multiple web documents in parallel : Automation API

Automating multiple web documents in parallel

Class library usage, coding and language questions.

Automating multiple web documents in parallel

Postby markvanraalte » Mon Aug 02, 2010 12:02 pm

Hi
I want to set up a process where by I automate different test procs with several browsers in parallel (using different threads).
My problem is that:
testScript1 needs to run on browser1 at URL1
and testScript2 needs to run on browser2 at the same URL1.
and testScript3 needs to run on browser3 at the same URL1.

These (different) tests will be reading and setting "equivalent" controls on different browser documents, and I want to keep them separate.
Now I understand that the controls on the different browsers will have the same RanoreXPath.
Therefore I'm concerned the process will not be reliable. I need to ensure that TestScript1 only accesses browser1 and so on;

In my application, I tend to build up the XPath strings manually and use the Find(), FindSingle() functions for identifying elements.

For example:

I would start the process by opening the web document:

System.Diagnostics.Process.Start("iexplore.exe", "www.myurl.com");
WebDocument webDocument = "/dom[@caption='My Caption']";

Then I would start another instance of the browser, using the same commands. How do I separately identify them?
markvanraalte
 
Posts: 13
Joined: Thu Apr 15, 2010 5:34 pm

Re: Automating multiple web documents in parallel

Postby artur_gadomski » Mon Aug 02, 2010 12:35 pm

I haven't done any web testing but it should be possible where you have:
WebDocument webDocument = "/dom[@caption='My Caption']";
to include browser specific information in path. Probably something like '@BrowserName='IE''
Try it out by oppening all 3 browsers with URL1 and playing arround with RxPath in Spy.
User avatar
artur_gadomski
 
Posts: 125
Joined: Mon Jul 19, 2010 7:55 am
Location: Copenhagen, Denmark

Re: Automating multiple web documents in parallel

Postby Support Team » Mon Aug 02, 2010 2:21 pm

Hi,

Please take a look to following post
running-multiple-tests-in-parallel-t1241.html
In this post will be explained how to use parallel tests and what will be possible.
About to identify and distinguish different objects with RxPath, please take a look to our screen casts about the RxPath http://www.ranorex.com/support/screencasts.html

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4837
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests