calculation of multiple fields

Ask general questions here.
courtneyc
Posts: 3
Joined: Fri Jul 20, 2012 2:15 pm

calculation of multiple fields

Post by courtneyc » Fri Jul 20, 2012 2:31 pm

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

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

Re: calculation of multiple fields

Post by Ciege » Fri Jul 20, 2012 5:08 pm

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.
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...

courtneyc
Posts: 3
Joined: Fri Jul 20, 2012 2:15 pm

Re: calculation of multiple fields

Post by courtneyc » Fri Jul 20, 2012 8:09 pm

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

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

Re: calculation of multiple fields

Post by Ciege » Fri Jul 20, 2012 8:16 pm

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);
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...

courtneyc
Posts: 3
Joined: Fri Jul 20, 2012 2:15 pm

Re: calculation of multiple fields

Post by courtneyc » Mon Jul 23, 2012 2:00 pm

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