(self)
| 4 | |
| 5 | class PDFAssertTests(BaseCase): |
| 6 | def test_assert_pdf_text(self): |
| 7 | self.goto("data:,") |
| 8 | if self.headless: |
| 9 | self.skip("Skip this test in headless mode!") |
| 10 | if not self.undetectable or not self.external_pdf: |
| 11 | self.activate_cdp_mode(external_pdf=True) |
| 12 | # Assert PDF contains the expected text on Page 1 |
| 13 | self.assert_pdf_text( |
| 14 | "https://nostarch.com/download/Automate_the_Boring_Stuff_dTOC.pdf", |
| 15 | "Programming Is a Creative Activity", |
| 16 | page=1, |
| 17 | ) |
| 18 | # Assert PDF contains the expected text on any of the pages |
| 19 | self.assert_pdf_text( |
| 20 | "https://nostarch.com/download/Automate_the_Boring_Stuff_dTOC.pdf", |
| 21 | "Extracting Text from PDFs", |
| 22 | ) |
nothing calls this directly
no test coverage detected