Programmatically capturing data from certain field.

Class library usage, coding and language questions.
asangahtang
Posts: 4
Joined: Thu Mar 14, 2013 11:03 pm

Programmatically capturing data from certain field.

Post by asangahtang » Thu Mar 28, 2013 4:35 pm

Hello, I want to capture data from a certain field. Is it possible to achieve this by writing manual C# code in Ranorex? The goal I am trying to achieve is creating reusable code.

Lets say I am trying to capture the price for the product for the Dell Monitor, it is $12.99
I want to be able go to another page, run the same code and it will capture the price for Dell Storage hard drive $84.99

Recording and creating steps would be great if the environment is fixed, but the product list are prone to changes. New products would occasionally be added and move around. That would break the test and it will take too many man hour to change the element because of the various environment the test has to go through.

(ADDITIONAL INFORMATION - this is a Windows 8 metro application)

Any suggestions ?

Thank you for your help.
Attachments
Dell_Monitors.jpg
Dell_Monitors.jpg (191.01 KiB) Viewed 787 times
Dell_Storage.jpg
Dell_Storage.jpg (191.46 KiB) Viewed 787 times

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

Re: Programmatically capturing data from certain field.

Post by Support Team » Fri Mar 29, 2013 2:44 pm

Hello,

You can try to customize the RanoreXPath from the element using regular expression. Please read the section "RanoreXPath" in our user guide in order to get more information how to work with the RanoreXPath.
Please let me know if you need more assistance or if my suggestion doesn't meet your needs.

Regards,
Bernhard
.
Image