help with creating Ranorex Path : General Questions

help with creating Ranorex Path

Ask general questions here.

help with creating Ranorex Path

Postby martinsw » Thu Aug 09, 2012 6: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 16 times
receiptedcolumn.rxsnp
(217.51 KiB) Downloaded 15 times
scrrenshot.jpg
scrrenshot.jpg (37.78 KiB) Viewed 134 times
martinsw
 
Posts: 68
Joined: Fri Dec 09, 2011 3:48 pm

Re: help with creating Ranorex Path

Postby Ciege » Thu Aug 09, 2012 8: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...
User avatar
Ciege
Ranorex Guru
 
Posts: 1270
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA

Re: help with creating Ranorex Path

Postby martinsw » Fri Aug 10, 2012 10: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 16 times
martinsw
 
Posts: 68
Joined: Fri Dec 09, 2011 3:48 pm

Re: help with creating Ranorex Path

Postby Support Team » Fri Aug 10, 2012 2: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
User avatar
Support Team
Site Admin
 
Posts: 6838
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: help with creating Ranorex Path

Postby martinsw » Mon Aug 13, 2012 4: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
martinsw
 
Posts: 68
Joined: Fri Dec 09, 2011 3:48 pm


Return to General Questions

Who is online

Users browsing this forum: No registered users and 0 guests