Hello Guys
I am trying to narrow down the insrtances Ranorex is locating a container. Currently it is finding 8 instances but I only want a certain one. The current Xpath is as follows:
/form[@title~'-']/element[@class='AfxMDIFrame100']//container[@instance='0']
I tried adding an extra instance to the end:
/form[@title~'-']/element[@class='AfxMDIFrame100']//container[@instance='0'] [8]
But when the system changes to another sector (I work on Air Traffic Systems) the instance simply couldn't be seen.
My question; is there a way we can add the size to the Xpath as this is unique?
Thanks in advance
Adding Size setting to Xpath
Re: Adding Size setting to Xpath
Hi,
Could you please upload a Ranorex snapshot (NOT screesnhot) of the app under test? This would greatly help us to find a best way, how to specify the xpath for your particular element.
Generally speaking, it should be possible to add a width/height and x/y coordinates of desired element to the xpath. This information just got lost in new Ranorex User guide. Check for example this post:
rawtext-based-off-location-t12938.html#p51785
Could you please upload a Ranorex snapshot (NOT screesnhot) of the app under test? This would greatly help us to find a best way, how to specify the xpath for your particular element.
Generally speaking, it should be possible to add a width/height and x/y coordinates of desired element to the xpath. This information just got lost in new Ranorex User guide. Check for example this post:
rawtext-based-off-location-t12938.html#p51785
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: Adding Size setting to Xpath
Thanks for the response.
The SIZE of the instance is 585,67 I'm not sure how to insert this as i dont want to edit the form only the container:
/form[@title~'-']/element[@class='AfxMDIFrame100']//container[@instance='0']
I'm not at work so cant upload just yet.
The SIZE of the instance is 585,67 I'm not sure how to insert this as i dont want to edit the form only the container:
/form[@title~'-']/element[@class='AfxMDIFrame100']//container[@instance='0']
I'm not at work so cant upload just yet.
Re: Adding Size setting to Xpath
Hi,
Unfortunately, without snapshot, I can only guess the xpath You can try something like this:
Unfortunately, without snapshot, I can only guess the xpath You can try something like this:
/form[@title~'-']/element[@class='AfxMDIFrame100']//container[@instance='0' and (width()=585 and height()=67)]
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: Adding Size setting to Xpath
Thats worked very much appreciated