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

Can't pass viewport size to Puppeteer #285

Open
andrey-p opened this issue Aug 13, 2018 · 1 comment
Open

Can't pass viewport size to Puppeteer #285

andrey-p opened this issue Aug 13, 2018 · 1 comment

Comments

@andrey-p
Copy link

With the older PhantomJS-based version, we were able to set the viewport size by passing something like:

page: {
    viewportSize: {
        width: 1200,
        height: 768
    }
}

Is it possible to expose viewport size as an option to Puppeteer? Or maybe just allow us to pass arbitrary arguments to puppeteer.launch()?

@simevo
Copy link

simevo commented Oct 19, 2018

Hi, I'll sneak in my request here since it's related.

While trying to nail down a Travis CI build issue, I found here the following tip:

To run headless Chrome on Travis, you must call [puppetteer.]launch() with flags to disable Chrome's sandbox, like so: const browser = await puppeteer.launch({args: ['--no-sandbox']});

So we could try this solution if only we could pass arbitrary arguments to puppeteer.launch(). Help !

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

No branches or pull requests

3 participants