playwright
playwright copied to clipboard
[Bug]: PDF Preview is not working on webkit
Version
1.42.1
Steps to reproduce
Run any Test case which requires PDF preview and content validation for webkit browser
Expected behavior
PDF should be preview on clicking on it
Actual behavior
PDF is not previewed and blank PDF is displayed for webkit browser
Additional context
It worked with firefox with below launch options
name: 'firefox', use: { ...devices['Desktop Firefox'], storageState: 'tests/.auth/user.json', launchOptions: { firefoxUserPrefs: { "pdfjs.disabled": false, } } }, dependencies: ['setup']
Environment
System
OS: Windows 11
Node: version 16
PDF preview is not a part of WebContent, rather a Safari plugin. It is outside of scope for Playwright testing.
I don't know what ENABLE_PDFJS is. But, GTK and WPE ports enable it. https://github.com/WebKit/WebKit/blob/3fcd2236523c0c65609407eed1ff48fd0f7e12b9/Source/cmake/OptionsGTK.cmake#L93
I don't know what ENABLE_PDFJS is. But, GTK and WPE ports enable it.
There isn't much we can test / validate about the pdf viewer.
I think we'd much rather prefer that pdfs trigger downloads, like WK/FF are already doing as per https://github.com/microsoft/playwright/issues/7822.
I don't know what ENABLE_PDFJS is. But, GTK and WPE ports enable it. https://github.com/WebKit/WebKit/blob/3fcd2236523c0c65609407eed1ff48fd0f7e12b9/Source/cmake/OptionsGTK.cmake#L93
How can we add it in the config for enabling in webkit , like we have done for forefox above ?
How can we add it in the config for enabling in webkit , like we have done for forefox above ?
There is no such config in Playwright.
Folding into https://github.com/microsoft/playwright/issues/7822 - enabling PDF viewer is outside of our e2e testing scope.