Automating multiple web documents in parallel

Class library usage, coding and language questions.
markvanraalte
Posts: 13
Joined: Thu Apr 15, 2010 4:34 pm

Automating multiple web documents in parallel

Post by markvanraalte » Mon Aug 02, 2010 11:02 am

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?

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: Automating multiple web documents in parallel

Post by artur_gadomski » Mon Aug 02, 2010 11:35 am

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
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Automating multiple web documents in parallel

Post by Support Team » Mon Aug 02, 2010 1:21 pm

Hi,

Please take a look to following post
http://www.ranorex.com/forum/running-mu ... 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
.
Image