Easy way to cahnge root dom in Repository

Ask general questions here.
Dorian
Posts: 1
Joined: Fri Aug 21, 2020 10:52 am

Easy way to cahnge root dom in Repository

Post by Dorian » Fri Aug 21, 2020 11:05 am

Hello

I'm working on some testcases that are currently only running in a testing environment. We would like to expand the tests to also be able to run in our production environment after we release a version.
I know I can pass a global parameter through the command line and then assign that to a variable in the repository at the root level. But this would require me to bind that global parameter to every single recording.

My question now is: is there an easier way to make the environment variable short of duplicating the project or the above mentioned solution?

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

Re: Easy way to cahnge root dom in Repository

Post by odklizec » Mon Aug 24, 2020 1:50 pm

Hi,

The only other (and easier) way is to "hardcode" new domain name directly to DOM element, using OR logical operator, like this:
/dom[@domain='abc' or @domain='def']
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