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 "Live" 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. Otherwise, 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, 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 and Firefox, and PDF screenshots in Firefox are currently not available.
- Cannot use the mabl Trainer to record and test PDF files in the Chrome Incognito mode.
- 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://'
- Cannot make assertions against documents that are solely images, such as scans.
- No support for filling out PDF forms.
Updated 4 months ago