Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose API to enable mobile emulation mode #94

Open
d4rky-pl opened this issue Jul 14, 2020 · 1 comment
Open

Expose API to enable mobile emulation mode #94

d4rky-pl opened this issue Jul 14, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@d4rky-pl
Copy link

From what I see in the library there's only one call to setDeviceMetricsOverride that sets mobile: false.

It would be great if there was an exposed API to enable mobile emulation and manage width and height of the viewport dynamically.

@alagos
Copy link

alagos commented Jan 15, 2021

FWIW, I've added a mobile user agent to emulate it:

agent = 'Mozilla/5.0 (Linux; Android 7.0.0; Pixel Build/Unknown;) AppleWebKit/537.36.0 (KHTML, like Gecko) Chrome/60.0.0.0 Mobile Safari/537.36.0'
browser.headers.set("User-Agent" => agent)

Probably isn't the same, but it worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants