Need to capture a text on the html page

Ranorex Spy, Recorder, and Studio.
vdoddaguni
Posts: 11
Joined: Mon Apr 11, 2011 9:34 pm

Need to capture a text on the html page

Post by vdoddaguni » Wed Jul 20, 2011 5:20 pm

Hi,

We are a licensed user of Ranorex and use it to test our web applications. I would like to capture the order number after an order has been placed.

Once an ordered has been placed we get a message like this

your confirmation # is 12345.

I need Ranorex to capture the text "12345". How can this be done? Please let me know...

Thanks

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

Re: Need to capture a text on the html page

Post by Ciege » Wed Jul 20, 2011 5:45 pm

Did you use RanorexSpy to get the proper xPath of the text item in the AUT?
Once you get that path you can put that into your code and grab the text.
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...

vdoddaguni
Posts: 11
Joined: Mon Apr 11, 2011 9:34 pm

Re: Need to capture a text on the html page

Post by vdoddaguni » Wed Jul 20, 2011 10:35 pm

Hi,

Do we need to use RanorexSpy during recording or after that to capture the text? Can you provide the logic / code to capture that text. Please provide an example if possible...

Thanks

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

Re: Need to capture a text on the html page

Post by Ciege » Wed Jul 20, 2011 10:47 pm

Well the most basic example would be something like this...

Code: Select all

MyText = MyForm.FindSingle(".//text[@text='myTextBox]", 60000);
If you want more, please show that you are at least trying to figure this out for yourself by reading the documentation or the copious amounts of other forum posts that ask the same question.
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...