This code automates a test that creates an invoice on the UI, downloads a PDF of that invoice, then verifies the PDF with Applitools.
A blog post with step-by-step instructions can be found here: http://angiejones.tech/test-automation-for-pdf-files/