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

Emulate devices? #12

Closed
aslushnikov opened this issue Jun 14, 2017 · 4 comments
Closed

Emulate devices? #12

aslushnikov opened this issue Jun 14, 2017 · 4 comments

Comments

@aslushnikov
Copy link
Contributor

Thanks to the emulation domain, we can emulate mobile devices.

Is there a need for such an api in puppeteer? If yes, what's the scenario and what would api look like?

@aslushnikov
Copy link
Contributor Author

@ebidel: do you think this might be needed?

@paulirish
Copy link
Collaborator

Certainly for testing with different UAs.

In LH we do a pretty heavy emulation:

  • devicemetricsoverride w/ nexus 5 stats
  • setvisiblesize with viewport size
  • setuseragentoverride
  • settouchemulationenabled (for feature detects, etc)
  • the extra ontouch handlers enabled via a addScriptToEvaluateOnLoad

One approach here is to separate emulating screen, touch events, and network UA.
(as throttling and online/offline is already separate)

But yeah I think even casual users will need this. UA spoofing at a minimum, but then screenshots would also necessitate screen overrides.

@aslushnikov
Copy link
Contributor Author

Sweet, there's already Page.setUserAgentOverride, and @pavelfeldman is addressing the rest in #37

@aslushnikov
Copy link
Contributor Author

Device emulation has landed in #72.

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

No branches or pull requests

2 participants