Testing PDFs in mabl is as simple as testing a regular webpage, allowing you to maximize your test coverage. It's easy to automate the validation of PDF files and their contents, including capturing screenshots and detecting visual changes.
This feature is available to customers on the Enterprise plan, as well as all mabl trials.
Similar to testing in iframes and in new tabs/windows, you'll need to make sure that the trainer knows that you're testing a new PDF page.
First, verify that the "Record" button at the top is active and new steps are being recorded.
- If your PDF is embedded directly in the web page under test, you will see the mabl PDF viewer in place of the normal viewer.
- If the PDF opens full screen, or downloads, click on the PDF you'd like to open and interact with. When you do so, the PDF will be downloaded and you'll be prompted to select that you would like to test the PDF within the mabl trainer itself. When you click "YES", mabl will open the PDF in a new tab.
mabl supports both downloaded PDFs, as well as those embedded directly in an HTML page using
There are some basic limitations when testing PDFs, as they sometimes can be set up differently than a standard webpage. That being said, we try our best to simplify the testing process.
- Supported browsers are Chrome, Firefox, and Edge.
- PDFs that are generated via an HTTP POST request are only supported when encoded as 'x-www-form-urlencoded'.
- Due to restrictions in Chrome, blob URL PDFs can be trained against when embedded, or downloaded, but not when the blob URL is directly opened, i.e. the location bar URL starts with 'blob://'
- The Trainer cannot make assertions against documents that are solely images, such as scans.
- There is no support for filling out PDF forms.
PDF assertion is failing
Check if the PDF is being open in the default Chrome PDF viewer or the mabl PDF viewer. If the PDF is opened in the Chrome PDF viewer, you will have to record the download of the PDF and save the file anywhere.
Downloading the PDF will prompt the trainer to open the mabl PDF viewer, click YES
You will then see the trainer download and will be able to assert against the PDF
Updated 2 months ago