question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Improve handling of invalid browser arguments

See original GitHub issue

I was having problems diagnosing why webkit would not launch, it turns out I was using this which works in puppeteer but not playwright/webkit:

args: [`--window-size=${width},${height}`]

It would be nice if this case would handles explicitly to avoid users needing to manually investigate the problem.

https://github.com/xtermjs/xterm.js/pull/2725/commits/a18bac7380d832d82aceabc63c47becee16fd9b0

Related discussion: https://github.com/microsoft/playwright/issues/1041

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
aslushnikovcommented, Feb 24, 2021

my main reason for creating the issue was only because webkit yelled at me and the output was suppressed as dumpio

@Tyriar I think this is no longer the case in 2021. I just tried with Playwright v1.9.0 and the following worked perfectly:

const { webkit } = require('playwright');

(async () => {
    const browser = await webkit.launch({args: ['--window-size=100,100']});
    const context = await browser.newContext()
    const page = await context.newPage();
    await page.goto('https://aslushnikov.com');
    console.log(await page.evaluate(() => 7 * 8));
    await browser.close();
})();

Alternatively, when the browser errors out, always show at least the last part of the browser’s output?

And we also do this nowadays 😃 So I’ll close the issue. Feel free to re-submit if I’m wrong!

1reaction
Tyriarcommented, Feb 19, 2020

@pavelfeldman my main reason for creating the issue was only because webkit yelled at me and the output was suppressed as dumpio was false that it was a pain to figure out what was going wrong. Alternatively, when the browser errors out, always show at least the last part of the browser’s output?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling common HTML and CSS problems - MDN Web Docs
We said in the first article of this series that a good strategy to begin with is to test in a couple of...
Read more >
Microsoft Edge Browser Policy Documentation
Windows and Mac documentation for all policies supported by the Microsoft Edge Browser.
Read more >
chrome.webRequest - Chrome Developers
# Error handling​​ If you try to register an event with invalid arguments, then a JavaScript error will be thrown, and the event...
Read more >
Set Chrome policies for users or browsers - Google Support
Selecting Enable Active Directory Management lets you manage ChromeOS devices using Microsoft Active Directory or your Admin console. Use the Device management ......
Read more >
Launching Browsers | Cypress Documentation
To run Chrome headed, you can pass the --headed argument to cypress run . You can also launch Chromium: cypress run --browser chromium....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found