Based on the input (Missouri, Iowa, California) i have to modify the Base xPath in Ranorex repository.
If Missouri, it should be test.mo.google.com
if Iowa, it should be test.ia.google.com
if California it should be test.ca.google.com
/dom[@domain~'test+$domainURL+.google.com']
I have created a variable called domainURL and thru data binding passed a value for domainURL but it is not working.
Add Variable in Base xPath?
-
- Posts: 1
- Joined: Sun May 24, 2020 9:30 am
Re: Add Variable in Base xPath?
Hi,
The xpath with variable must look like this:
So in situation like yours, I prefer to 'hardcode' the variable strings, like this:
The xpath with variable must look like this:
I personally don't like the idea to have variables in DOM, because it means I have to bind every single recording using repo elements/dom[@domain='test.'+$domainURL+'.google.com']

/dom[@domain~'test.(mo|ia|ca).google.com']
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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