When click on Download button, it opens a PDF file in new tab in the browser. I've to validate the URL of the PDF document but in headless mode it is not working. However in headed mode the test is passing.
await this.btnDownloadDoc.last().click() let downloadedDocURL = page.context().pages().url() console.log("downloadedDocURL: ", downloadedDocURL)
Your help is highly appreciated.
This thread is trying to answer question "How can the user verify the URL of a PDF document opened in a new tab when running in headless mode?"
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email firstname.lastname@example.org.