Page 1 of 1

calculation of multiple fields

Posted: Fri Jul 20, 2012 2:31 pm
by courtneyc
VB.NET user code
Ranorex V3.3.1
Windows 7 with IE8

I have two questions that I hope someone can help me with.

1. Is it possible to validate fields within a PDF document and not just the entire document at one time?

2. I have some data that populates to a PDF or and Excel document. Can Ranorex do math calculations while validating fields or is there another way? Small example below

Field 1 + Field 2 = Field 3

Re: calculation of multiple fields

Posted: Fri Jul 20, 2012 5:08 pm
by Ciege
1) use RanorexSpy to have a look at your PDF and see if you can see the actual fields you want to validate and report back...

2) Anything you can do in code you can do in your automation. So yes, you can add fields together. You will need to get the text of each field into a variable, convert the text to an integer (or some other number type) and add them together... All can be done through code.

Re: calculation of multiple fields

Posted: Fri Jul 20, 2012 8:09 pm
by courtneyc
Thanks Ceige,

I was able to figure out the answer to question 1. It a viewing issue with my adobe reader.
Still having some issues with question number 2. Is there a training video that you all offer that might further assist me? I’m fairly new to automation testing so my knowledge of the software is lacking.

Thanks,

Courtney

Re: calculation of multiple fields

Posted: Fri Jul 20, 2012 8:16 pm
by Ciege
What development language are you using? Once you get the fields you want assigned to a variable you can search for how to convert a string var to a number var and add them together for your development language of choice.

In C# I use the ToInt method to convert a string to an integer...

Code: Select all

intMyInt = Convert.ToInt32(strMyString);

Re: calculation of multiple fields

Posted: Mon Jul 23, 2012 2:00 pm
by courtneyc
As of right now our development team uses VB.net but within the next six months they will be converting to C#. I’m not a developer; I’m just a QA tester so I’ll try to do some more research to figure this one out.

Thanks