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

Mobile Test #225

Open
tuan91 opened this issue Jan 21, 2019 · 1 comment
Open

Mobile Test #225

tuan91 opened this issue Jan 21, 2019 · 1 comment

Comments

@tuan91
Copy link

tuan91 commented Jan 21, 2019

Hi, is it possible to test various mobile devices?
If so, how can I do that?
Thank you!

@olessavluk
Copy link

olessavluk commented Dec 20, 2019

Hello,

Yes, you can test mobile devices. But this has nothing to do with this library, since it work with images you have already created using other tools available.

For example using Puppeteer, this would be something like:

const puppeteer = require('puppeteer');
const iPhone = puppeteer.devices['iPhone 6'];

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.emulate(iPhone);
  await page.goto('https://www.google.com');
  await page.screenshot({path: 'screenshot.png'});
  await browser.close();
})();

see puppeteer.devices for more info.

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