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.

[Question] How to disable bringing page to front during launching.

See original GitHub issue

Its Headful mode.

Currently I am doing web chat tests where I would like to test multiple context.

If I spawn new context it brings that page to front loosing the focus.

let browser = await firefox.launch()

// Every 1 minute open new context and open page just to test if chat shows history or not.
while(true) {
  let context = await browser.newContext()
  let page = await context.newPage();
  
  // delay code is there not shown here.

}

The issue is that newContext spawns a new window which has focus or something is in page that is calling page.bringToFront() when its launched.

Questions:

  1. I would like to disable these behavior. If possible please let me know.
  2. Is there anyway to minimize the context window after launch. If I need to bring page to front I think i can call page.bringToFront() at the moment.

Its not a new issue I think and there are no answers available afaik. https://github.com/puppeteer/puppeteer/issues/5484 https://stackoverflow.com/questions/53501564/hide-browser-in-puppeteer

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
bstrocommented, Nov 17, 2021

I also experience this; its pretty annoying to have jest running with --watch while developing and have focus stolen away constantly by the playwright. It seems like it has to be possible to have an option to instruct playwright to open Chromium in the background, rather than foreground.

0reactions
shirshak55commented, Jan 16, 2021

alright then I shall close this issue 😃 I also think its probably firefox or chrome issue

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I bring my application window to the front? [duplicate]
I use SwitchToThisWindow to bring the application to the forefront as in this example: static class Program { [DllImport("User32.dll", SetLastError = true)] ...
Read more >
Reset Chrome settings to default - Google Support
You can restore your browser settings in Chrome at any time. ... Learn how to set your Chrome homepage and set default start-up...
Read more >
New features available with macOS Ventura. - Apple
Preview the latest features, enhancements, app updates, and more in macOS Ventura for Mac.
Read more >
Common questions about the Microsoft Authenticator app
To remove the app from a device using a personal Microsoft account, go to the two-step verification area of your Account Security page...
Read more >
Fix Paperback and Hardcover Formatting Issues
(In paperback and hardcover books, every page has a front and back side, ... of your front matter so that page numbers start...
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