Closed
Description
openedon Apr 2, 2020
Context:
- Playwright Version: 0.12.1
- Operating System: Mac (but we use the ubuntu docker specified in doc)
- Extra: We use docker https://github.com/microsoft/playwright/tree/master/docs/docker to run the screenshot test
Code Snippet
When you running this script in the ubuntu docker
const { webkit } = require('playwright');
(async () => {
const WEBKIT_DEVICE = Playwright.devices['iPhone 6']
const browser = await webkit.launch({ dumpio: true });
const context = await browser.newContext(WEBKIT_DEVICE);
const page = await context.newPage();
await page.goto('https://google.com');
await page.screenshot({path: 'screenshot.png'});
await browser.close();
})();
Describe the bug
Getting snapshot image like this:
note that the screenshot has correct dimension (750 x 1334), however, the site was loaded under the unscaled dimension (375 x 667). So the deviceScaleFactor (which is 2 for iPhone 6) doesn't really work.
Also I am seeing some error from the browser:
[err] EGLDisplay Initialization failed: EGL_NOT_INITIALIZED
[err]
[err] ** (WPEWebProcess:559): WARNING **: 23:53:54.649: Error loading the injected bundle (/usr/local/lib/wpe-webkit-1.0/injected-bundle/libWPEInjectedBundle.so): /usr/local/lib/wpe-webkit-1.0/injected-bundle/libWPEInjectedBundle.so: cannot open shared object file: No such file or directory
[err] Fontconfig error: Cannot load default config file
[err] GLib-GIO-Message: 23:53:54.725: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels