run recording on the same website with different domain?

Ranorex Studio, Spy, Recorder, and Driver.
yinghu
Posts: 26
Joined: Thu Oct 25, 2012 5:48 pm

run recording on the same website with different domain?

Post by yinghu » Thu Aug 08, 2013 3:15 pm

Hi folks,

I recorded a recording file for a site with domain starts with cc.auto. Now it was changed to cc.qa.
I saw there were a lot of elements in the repository with cc.auto as an xpath.

Is there an easy way to run this recording script on the new domain without re-recording it?

Thanks in advance!

yinghu

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: run recording on the same website with different domain?

Post by krstcs » Thu Aug 08, 2013 3:36 pm

You could edit all of those repository items and make the domain a variable that you set in a global parameter. That way you could just change the value of the Global Parameter.

Code: Select all

ORIGINAL PATH: /dom[@domain="123.com"]/...

VARIABLE PATH: /dom[@domain=$testDomain]/...
You should probably also re-arrange your repository so that everything with that path was inside a rooted-directory. You could then right-click the folder and choose "Optimize Folder Path" and have only one object to edit.
Shortcuts usually aren't...

yinghu
Posts: 26
Joined: Thu Oct 25, 2012 5:48 pm

Re: run recording on the same website with different domain?

Post by yinghu » Thu Aug 08, 2013 3:53 pm

Thanks alot for your quick response!

I am guessing this is the best way to do that.

Appreciated!
krstcs wrote:You could edit all of those repository items and make the domain a variable that you set in a global parameter. That way you could just change the value of the Global Parameter.

Code: Select all

ORIGINAL PATH: /dom[@domain="123.com"]/...

VARIABLE PATH: /dom[@domain=$testDomain]/...
You should probably also re-arrange your repository so that everything with that path was inside a rooted-directory. You could then right-click the folder and choose "Optimize Folder Path" and have only one object to edit.