Page 1 of 1

Need to capture a text on the html page

Posted: Wed Jul 20, 2011 5:20 pm
by vdoddaguni
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

Re: Need to capture a text on the html page

Posted: Wed Jul 20, 2011 5:45 pm
by Ciege
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.

Re: Need to capture a text on the html page

Posted: Wed Jul 20, 2011 10:35 pm
by vdoddaguni
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

Re: Need to capture a text on the html page

Posted: Wed Jul 20, 2011 10:47 pm
by Ciege
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.