run the same rcording on different web-browsers

Ask general questions here.
ecohen
Posts: 17
Joined: Thu May 09, 2013 10:42 am

run the same rcording on different web-browsers

Post by ecohen » Wed May 22, 2013 11:55 am

hi
I recorded a test case on Win7x64 with IE9.
will this test case run properly on IE8? win XP?

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

Re: run the same rcording on different web-browsers

Post by Support Team » Thu May 23, 2013 7:32 am

Hello,

If your website has the same structure in IE8 and in IE9 this should work. In some cases it could be that the RanroeXPath to the elements are not exactly equal in different versions of IE. In that case you have to adapt the path for these elements that the specific element can be found in both versions of Internet Explorer.
I would recommend to try if the test runs on both versions.

Regards,
Bernhard
.
Image

mdgairaud
Posts: 87
Joined: Sun Aug 05, 2012 11:59 am
Location: Bilbao, Spain

Re: run the same rcording on different web-browsers

Post by mdgairaud » Thu May 23, 2013 9:22 am

I use variable to determine what version of browser I use to run the test. But instead of change between IE9 & IE8 I change between IE9 & FF13 (they shared a lot of XPath :D ).

Most of XPaths would be useful, but for the XPaths that differs use the variable to use one or other

pseudo-code of what i'm doing:

Code: Select all

if browser = IE9 & OS = Windows7
    use this control
else
    //IE8 & WindowsXP
    use this control


regards,
Mateo.
Last edited by mdgairaud on Thu May 23, 2013 11:19 am, edited 1 time in total.

ecohen
Posts: 17
Joined: Thu May 09, 2013 10:42 am

Re: run the same rcording on different web-browsers

Post by ecohen » Thu May 23, 2013 10:18 am

I use the same code on both IE8/9.
I tried to run the same scenario (recorded on IE9) but the recorder cannot recognize some of the elements.
I did the same on IE10 and it worked good.
what is the best way to adapt IE9 recording into IE8? is it possible to do this automaticly, or i have to record everything again? :shock:
Last edited by ecohen on Sun May 26, 2013 9:19 am, edited 1 time in total.

mdgairaud
Posts: 87
Joined: Sun Aug 05, 2012 11:59 am
Location: Bilbao, Spain

Re: run the same rcording on different web-browsers

Post by mdgairaud » Thu May 23, 2013 11:16 am

Hi,

No, all the test no... only record (or recognize again with spy) the elements that are not compatible between IE9 and IE8. Then in repository add the prefix IE8 or IE9 to avoid confussion.

To know what controls are compatible or not, run the test step-by-step and you can see what controls are good or not.

Then put a condition to let the code switch between controls depending the browser used.



regards,
Mateo.

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

Re: run the same rcording on different web-browsers

Post by Support Team » Fri May 24, 2013 1:25 pm

Hi ecohen,

Do you know our blog about cross browser testing? There it is also described how you could handle such scenarios with Ranorex.
You could also use the Spy tool in order to analyze the differences of the RxPaths, but in general there shouldn't be great differences between the browsers and the versions of the browsers.
You could for instance create a Ranorex snapshot file of your webpage and compare it with the elements shown in the Spy of your webpage opened in the other browser.

Regards,
Markus
.
Image