A way of capturing the value into a variable in memory

How to apply eValid to functional testing of web applications.

A way of capturing the value into a variable in memory

Postby hNoel » Tue Nov 06, 2012 3:20 pm

Hi all,

My application sends a unique reference number during each iteration.

I need to be able to capture this number to parameter so that I can use it later.

So the pop up window says:

"Congratulations your reference number is 123456."

123456 changes each time. Is there a way of capturing this value into a variable in memory?

Best,

Noel
hNoel
 
Posts: 4
Joined: Wed Jan 11, 2012 4:27 pm

Re: A way of capturing the value into a variable in memory

Postby eValid » Sun Nov 18, 2012 3:12 pm

hNoel wrote:Hi all,

My application sends a unique reference number during each iteration.

I need to be able to capture this number to parameter so that I can use it later.

So the pop up window says: "Congratulations your reference number is 123456."

123456 changes each time. Is there a way of capturing this value into a variable in memory?

Best, Noel

We assume here that the unique number is displayed on the browser face after submission of some kind of test action, and what you need to do is find the number, scrape it from the screen, and store it locally.

Here are the steps for eValid to do this:

(1) Identify property values for the element that contains the string that is displayed as the unique number on the screen. You can do this easily with the PageMap display, which reflects ths post-submission screen. Look for some specific and hopefully unique feature of that element that will always be present -- one that is unlikely to change from order to order. This would be the pivot of your script when it searches the page to retrieve the data.

If the element has a unique ID tag value, you're in luck.

If not, you will need to search for some other associated unique identifier. Maybe the innerHTML value or some other property. Here's where you need to get creative! You have to find something that is invariant across page changes.

(2) In your eValid script, at the point after which the page containing the unique number is ready to process, set up a search using the IndexFindElement command to locate the element which has the exact property you identified as unique to that data delivery point.

At this point, in playback, the internal sourceIndex value will be pointing to that element.

(3) Now, use the IndexSaveObjProperty command to save the value of the specific property value that is the "order number" to a local file that you name in the command.

If you wish to further process this number, now that is captured into a local file, you can run a local Windows command using eValid's SystemCall command.

eValid Support
eValid
 
Posts: 2395
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to Desktop and Mobile Device Functional Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons