I had scripts running with no issues in ranorex versions before 8.1 where the xPath has two conditions as in, an ID and visible=true (or any other). After 8.1 was released it does not find the xPath and scripts fail.
Example of an xPath: .//input[@id='ctl00_phFolderContent_BillingProviderName' and @value='Test1']
Is this intended?
Why does Ranorex not like two conditions in an xPath
-
- Posts: 9
- Joined: Wed Nov 08, 2017 10:59 pm
Re: Why does Ranorex not like two conditions in an xPath
Hi,
I’m pretty sure that xpath conditions work OK. My tests are full of them and I would quickly realise that there is something wrong with them. Are you sure that both conditions apply for the element in question (at a time of accessing the element)? Could you please post exact error message you got and a Ranorex snapshot of the problematic element? Thanks.
I’m pretty sure that xpath conditions work OK. My tests are full of them and I would quickly realise that there is something wrong with them. Are you sure that both conditions apply for the element in question (at a time of accessing the element)? Could you please post exact error message you got and a Ranorex snapshot of the problematic element? Thanks.
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
Re: Why does Ranorex not like two conditions in an xPath
Is it appropriate to add a question on here? Can you point me to a sample of how to do a conditional xpath? I have not yet found that in the documentation. Thank you.
-
- Certified Professional
- Posts: 39
- Joined: Mon Dec 12, 2016 9:24 am
Re: Why does Ranorex not like two conditions in an xPath
Hi sstowe,
This blog post might be helpful for you.
You can combin attributes by 'and' or 'or' to make your path more reliable.
Hope that helps,
DP
This blog post might be helpful for you.
You can combin attributes by 'and' or 'or' to make your path more reliable.
Hope that helps,
DP
Please always include the following information to your posts
- Ranorex Version
- OS Version
Re: Why does Ranorex not like two conditions in an xPath
Ayuh! Thanks!