Domain name trouble

Ranorex Studio, Spy, Recorder, and Driver.
csolanki
Posts: 120
Joined: Thu Mar 22, 2018 8:51 am

Domain name trouble

Post by csolanki » Wed Aug 29, 2018 11:07 am

Hi Team,

I have come across an issue, If I want to run my scripts in staging as well as prod environment, in which the change is only of URL. For ex. stag.xyz.com and xyz.com. When I am trying to run it, my test cases are failing due to domain change problem.

As in few cases, only 'a' element has been called by base domain. How to run my scripts across dev, stag and prod environment. Is there anyway by which I can skip creating scripts in all different environment or in other words I can resume my one env script in another.

Ranorex version : 8.2.1
Windows : 10


Thanks.
Regards,
Charu Solanki
Ranorex User

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Domain name trouble

Post by odklizec » Wed Aug 29, 2018 1:12 pm

Hi,

Have you tried to use “or” operator within the domain xpath? Like this

Code: Select all

/dom[@domain=‘abc.com’ or @domain=‘xyz.com’]
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

csolanki
Posts: 120
Joined: Thu Mar 22, 2018 8:51 am

Re: Domain name trouble

Post by csolanki » Fri Aug 31, 2018 11:52 am

I have tried changing URL and domain, that worked.

But If I will give 2 domains as you suggested, I have to give 'or' between URL`s too. Is my understanding correct ?
Regards,
Charu Solanki
Ranorex User

Ashvin
Posts: 1
Joined: Wed Oct 31, 2018 2:51 pm

Re: Domain name trouble

Post by Ashvin » Wed Oct 31, 2018 2:58 pm

I have recorded the script in one domain and now i want execute same script in different domain.
where we need to define domain as variable in ranorex UI. Can you please share the steps with me?
is possible with screenshot?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Domain name trouble

Post by Support Team » Mon Nov 05, 2018 3:20 pm

Hello Ashvin,

There is a quite good article in our user guide describing how to use variables inside the Ranorex Repository.

Please read the section Repository variables and let us know if you have additional questions.

Best regards,
Bernhard

csolanki
Posts: 120
Joined: Thu Mar 22, 2018 8:51 am

Re: Domain name trouble

Post by csolanki » Fri Nov 23, 2018 2:41 pm

odklizec wrote:
Wed Aug 29, 2018 1:12 pm
Hi,

Have you tried to use “or” operator within the domain xpath? Like this

Code: Select all

/dom[@domain=‘abc.com’ or @domain=‘xyz.com’]
Hey, sorry for come back so late. But this did not work.
Regards,
Charu Solanki
Ranorex User

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Domain name trouble

Post by odklizec » Fri Nov 23, 2018 2:57 pm

Hi,

Unfortunately, without knowing more details, about what exactly does not work, there is not much anyone here can do or suggest. Could you please show us the structure of your repository and post a Ranorex snapshot of the problematic element(s)? Are you sure the domain name is the only changing attribute?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

csolanki
Posts: 120
Joined: Thu Mar 22, 2018 8:51 am

Re: Domain name trouble

Post by csolanki » Mon Nov 26, 2018 11:07 am

Hey,

Thanks a lot Odklizec. It worked, actually I did a mistake in changing domain name only in setup. Ideally it should be in repo. So, got it later posting comment.

Thanks for the help.
Regards,
Charu Solanki
Ranorex User