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

[headless] Impossible to accept/dismiss javascript dialogs #13

Closed
aslushnikov opened this issue Jun 16, 2017 · 1 comment
Closed

[headless] Impossible to accept/dismiss javascript dialogs #13

aslushnikov opened this issue Jun 16, 2017 · 1 comment
Labels

Comments

@aslushnikov
Copy link
Contributor

aslushnikov commented Jun 16, 2017

Example:

var Browser = require('puppeteer').Browser;
var browser = new Browser();
browser.newPage().then(async page => {
    page.on('dialog', dialog => {
        dialog.accept('test');
    });
    console.log(await page.evaluate(() => prompt('q?')));
    browser.close();
});

Dialog accepting/dismissing throws on error on headless:

Error: Protocol error (Page.handleJavaScriptDialog): Could not handle JavaScript dialog

Upstream bug: crbug.com/718235

@paulirish
Copy link
Collaborator

fixed bug link https://bugs.chromium.org/p/chromium/issues/detail?id=718235

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

No branches or pull requests

2 participants