Page 1 of 1

help with creating Ranorex Path

Posted: Thu Aug 09, 2012 5:00 pm
by martinsw
Dear Ranorex,

Please see attached screenshot and snapshots...

I need to create a Ranorex path that will identify the tick image as being in the receipted column. So if the receipting column is moved to a different position in the table the tick image will still be found in the receipt column. Can you assist with this please?

Thanks

Re: help with creating Ranorex Path

Posted: Thu Aug 09, 2012 7:47 pm
by Ciege
It would be a little easier to see this in a single RanorexSpy snapshot of the entire grid instead of a snap shot of each individual element...

Regardless, here is one possible solution to your question:

If you look at the TH element you will see that there is a ChildIndex = 5 (corresponds to the 5th TH element). Also, if you look at the TD element you will see it also has a ChildIndex = 5 (corresponds to the 5th TD in the row).

Using that information you should be able to construct a piece of code that searches for your TH by name (the InnerText of the A element under your TH), then get the ChildIndex of that TH element. From there you can look for the same ChildIndex for the TD elements in the row you want to examine and verify if it is ticked or not...

Re: help with creating Ranorex Path

Posted: Fri Aug 10, 2012 9:42 am
by martinsw
Hi Ciege,

Thanks for the response but writing my own user code is not a practical solution for me. I am a tester rather than a developer and I don't have extensive knowledge of C#. What I need is a solution to this problem that doesn't involve me writing user code.

I was hoping that a solution could be found just by creating the right ranorex path and then linking it to a "valdate exists" action in the relevant recording module. Please advise

Thanks

P.S. I have attached a snapshot of the full user grid to make life easier.

Re: help with creating Ranorex Path

Posted: Fri Aug 10, 2012 1:46 pm
by Support Team
Hi Martin,

Is the RxPath for the img which is shown in your Snapshot not working for your "/dom[@caption='Search-it']//img[#'PageLayout_grdProducts_ctl00_ctl04_imgReceipted']"?
For the Receipted column you can use the following RxPath "/dom[@caption='Search-it']//table[#'PageLayout_grdProducts_ctl00_Header']/thead/tr/th/a[@innertext='Receipted']".

Regards,
Markus
Ranorex Support Team

Re: help with creating Ranorex Path

Posted: Mon Aug 13, 2012 3:05 pm
by martinsw
Thanks Markus, I was trying to be too clever with my Ranorex path when i don't really need to be so no further investigation needed on this one.

Thanks,

Martin