Friday, September 17, 2010

Finding text on a downloaded PDF file

Subject: RE: [LoadRunner] Finding text on a downloaded PDF file

If you want to validate a PDF as a PDF in Acrobat on the target download
machine
{
1. Install software for a GUI Virtual User
2. Update LR license for appropriate number of GUI Virtual users
3. Install Acrobat Professional on all GUI Virtual User Machines
4. Install Acrobat Professional Add-ins designed for QA and content
Validation.
5. Develop GUI Virtual user scripts leveraging Acrobat Professional
QA-related add-ins.
6. Secure lots of OS instances for your GUI Virtual User Load
}

Odds of success greater than 75%, with the added dependency of your GUI
Virtual User development skills

If you want to try and validate content in stream
{
1. Save off five of your target PDF files
2. Open the PDF files in Notepad
3. Attempt to find the string you are interested in validating
4. Ensure that the validation string is consistently represented
In all five target files
}

Odds of success, less than 5% due to encryption/compression in the PDF
stream and possible representation of the characters are curves instead of
free text.

If you want to simply validate that you have received valid PDF files
{
1. Save off five target PDF files
2. Open these five files in Notepad and observe the commonality
in structure for the first ten lines and the last ten lines
of the file.
3. Open five random PDF files on your computer (not generated by
Your system) in notepad. Observe the first ten lines and the
Last ten lines in the file.
4. From your observations, develop an algorithm for checking for
A valid PDF file (for any PDF file)
5. Implement your checks as a set of web_reg_find() statements
Combined with a post download check for file size.
If (valid PDF header && valid PDF footer and download size>
Some minimal file amount) then (we have a valid PDF)
}

Odds of success > 99%, with the added dependency of your pattern matching
skills and your C Programming skills and your use of HTTP virtual user
content validation techniques.

James Pulley, http://www.loadrunnerbythehour.com/PricingMatrix

-----Original Message-----
From: LoadRunner@yahoogroups.com [mailto:LoadRunner@yahoogroups.com] On
Behalf Of Sanjay
Sent: Wednesday, September 01, 2010 8:54 PM
To: LoadRunner@yahoogroups.com
Subject: [LoadRunner] Finding text on a downloaded PDF file

Hi All,

I am recording and enhancing a script using URL recording mode (HTTP
protocol). I have been able to use the correlation feature to handle the
variables and am almost done except for one thing.

I have a popup window which is actually a PDF file. Is there a way I can use
Reg_Find or something similar to find text on the pdf file?

Any ideas on how to handle this would be greatly appreciated.

Thanks!
Sanjay

No comments: