Since UFT 14.52, it was added support to test PDF documents though a PDF add-in. Previous to this version, only way was to use File Content Checkpoints or Output Values as indicated in KM200768
The new PDF Add-in enables you to test interactive PDF documents opened in Adobe Acrobat Pro. You can record and run tests, as well as spy on objects in your application, without complex scripting or using UI Automation. For example, you can test PDF forms that need to be filled out.
The PDF add-in is introduced as a tech preview.
Requirements, limitations and considerations:
Configure the Reading options in Adobe Acrobat Pro in one of the following ways:
In the Adobe Acrobat Pro dialog box that opens when you first use UFT to record or spy on a PDF document:
- In Reading Order, select Infer reading order from document
- In Reading Mode Options, select Read the currently visible pages only
- Select Do not show this dialog again to avoid seeing it each time you use UFT to test PDF documents.
Tip: If the dialog box does not open, set the Reading options in Adobe Acrobat Pro, using Edit > Preferences.
- In Adobe Acrobat Pro, select Edit > Preferences, and then choose the Reading category.
In Reading Order, select Infer reading order from document
In Page vs Document, select Only read the currently visible pages
Clear the Confirm before tagging documents option to prevent the Adobe Acrobat Pro dialog box from opening each time you use UFT to test PDF documents.
Use Single Page View:
The documents you test must be displayed in Single Page View. (In Acrobat: View > Page Display > Single Page View).
Recording on PDFSignatureField test objects is not supported.
Adobe Acrobat Pro 11
When working with Adobe Acrobat Pro 11, running tests on PDFComboBox objects is not supported.
UFT recognizes PDF documents with different names as different test objects.
If your test saves a file with a different name, subsequent test steps must use a different test object for the file. You can do this in one of the following ways:
- Add another test object to the object repository
- Use a programmatic description for the test object, which uses the new file name.
PDFApplication("name:=NewFileName.pdf - Adobe Acrobat").GoToPage 5
For additional details, see the PDF section of the UFT Object Model Reference for GUI Testing.
- UFT identifies objects in a PDF document as Standard Windows objects
Solution: Make sure that the Adobe Acrobat Pro Reading options are configured correctly. See the prerequisite listed in PDF Add-in (tech preview).
- UFT does not correctly identify objects in a PDF document
- View the document in Full Screen mode. In Adobe Acrobat Pro, select View > Full Screen Mode.
- If UFT does not recognize the objects as PDF objects, try reopening Adobe Acrobat Pro.
- Restart both Adobe Acrobat Pro and UFT.