compare values

Ask general questions here.
strannik
Posts: 60
Joined: Tue Apr 29, 2014 3:00 pm

compare values

Post by strannik » Wed Apr 30, 2014 9:06 pm

Hi,
We are in process of valuating Ranorex and we need to compare values in website UI and generated pdf file the values are the same. Each time the system will generate new values for UI and pdf file. Is it possible to give us a code which will check that new generated values are correct.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: compare values

Post by Support Team » Fri May 02, 2014 3:25 pm

Hello strannik,

With Ranorex it is very easy to compare your values. Ranorex provides some very powerful tools. For example: the RanorexPath allows you to get values from different attributes. But there are also other possibilities to achieve your plan.

In order to get an overview about Ranorex I would suggest to attend to one of our free webinars.
You can find more informations about the webinars by following this link Webinars
In a webinar the important parts of Ranorex will be explained very well.

Kind regards,
Markus (S)
.
Image

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3921
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: compare values

Post by odklizec » Fri May 02, 2014 3:58 pm

I think it would be very hard (if not impossible) to compare GUI values with values stored in PDF file. I would suggest to use Excel xls or csv data file instead. These file formats can be seamlessly used with the existing Ranorex data connectors. PDF is probably the worst choice of format for storing data, which should be further used in your tests.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

mzperix
Posts: 137
Joined: Fri Apr 06, 2012 12:19 pm

Re: compare values

Post by mzperix » Tue May 06, 2014 10:32 am

Hi strannik,

You can use either user code or Ranorex Studio to make the comparison, if the elments of pdf you age genrating can be identified by Ranorex.

You can check in spy if the pdf structure is recognized by Ranorex.

So in Ranorex studio here are some steps:
1. Identify the webUI element
2. Get the value from the webUI with Get Value action using the identified webUI element.
3. Identify the pdf element
4. Compare the value in pdf with Validate action using the pdf element

If you want this in code, just use make the steps in Ranorex studio, and look at the generated code to have some clues on what to do.

Hope this helps:
Zoltan

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3921
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: compare values

Post by odklizec » Wed May 07, 2014 7:35 am

One learns something new every day ;) Using Foxit Reader, and not Adobe Reader, I was not aware it's possible to make the PDF files Accessible. So yes, as you already found in other discussion, it's possible to read and evaluate the PDF content from Ranorex. For future reference, here is the original Ranorex support post describing how to make the PDF files Accessible-friendly...
http://www.ranorex.com/forum/how-to-get ... tml#p18185
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration