Hi Guys,
I have automated tests that run on a mobile device as well as on the desktop browser. Now I noticed the rxPath of elements are more or less the same. So, I thought rather than having seperate repositories I can use one repository for both requirements. My base folder for devices is as follows:
/mobileapp[@devicename=$DeviceName]
For desktop it is:
/dom[@domain=$Domain]
I don't want to replicate items in the folders so I tried adding a rooted folder like so:
/?[@domain=$Domain or @devicename=$DeviceName]
However, although it works, this is very slow in finding elements. Is there a better way?
How to make rooted folder Base dynamic
-
- Posts: 254
- Joined: Tue Mar 24, 2015 5:05 pm
- Location: Des Moines, Iowa, USA
Re: How to make rooted folder Base dynamic
I think the problem is that you're actually making it an optional node by using the question mark. I think you want to use the asterisk instead./?[@domain=$Domain or @devicename=$DeviceName]
I have no idea if this is a good idea, but I think it will help you in your endeavor./*[@domain=$Domain or @devicename=$DeviceName]
Doug Vaughan
-
- Posts: 2
- Joined: Tue Oct 25, 2016 11:04 am
Re: How to make rooted folder Base dynamic
Thanks. Seems to have done the trick