help with creating Ranorex Path

Ask general questions here.
martinsw
Posts: 72
Joined: Fri Dec 09, 2011 2:48 pm

help with creating Ranorex Path

Post by martinsw » Thu Aug 09, 2012 5:00 pm

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
Attachments
receiptedtick.rxsnp
(228.15 KiB) Downloaded 120 times
receiptedcolumn.rxsnp
(217.51 KiB) Downloaded 121 times
scrrenshot.jpg
scrrenshot.jpg (37.78 KiB) Viewed 716 times

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: help with creating Ranorex Path

Post by Ciege » Thu Aug 09, 2012 7:47 pm

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...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

martinsw
Posts: 72
Joined: Fri Dec 09, 2011 2:48 pm

Re: help with creating Ranorex Path

Post by martinsw » Fri Aug 10, 2012 9:42 am

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.
Attachments
datagrid.rxsnp
(254.77 KiB) Downloaded 120 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: help with creating Ranorex Path

Post by Support Team » Fri Aug 10, 2012 1:46 pm

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
.
Image

martinsw
Posts: 72
Joined: Fri Dec 09, 2011 2:48 pm

Re: help with creating Ranorex Path

Post by martinsw » Mon Aug 13, 2012 3:05 pm

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