Open mightyiam opened 9 years ago
I too would like the ability to launch the browsers minimized or in the background. Very annoying to have to keep minimizing the screens manually. Did you find a solution?
I've seen this been suggested:
browsers: [
'ChromeBackground'
],
customLaunchers: {
ChromeBackground: {
base: 'Chrome',
flags: ['--no-startup-window']
}
},
While that works and launches Chrome in the background, Karma doesn't seem to detect the browser. So I've resorted to just making the window less obnoxious:
browsers: [
'ChromeSmall'
],
customLaunchers: {
ChromeSmall: {
base: 'Chrome',
flags: ['--window-size=300,300']
}
},
@AdamBuczynski Thanks for your answer. I use --window-position=-9999,0
.
A possible solution on linux would also be
DISPLAY=:1 meteor
which just opens on another display.
I totally agree that this would be nice, but I still have to see a way of making this actually possible, cross platform & cross browser :/
+1
Perhaps a related thing... when karma launches chrome that new chrome window seems to be the place where all new browser tabs appear. So for instance if the karma browser window is up and running and I follow a web link in an email the web page always loads as a new tab in the karma browser instance, as opposed to the normal chrome instance I already have running. Switching focus to the normal browser instance doesn't seem to have any effect. Any way to keep that from happening?
@chrisspurgeon my workaround was to start using Chromium as my default browser, and just use Chrome for karma.
Ooh, great idea!
+1
+1
+1
+1
+1
+1
Looks like running Chrome headless is just around the corner: https://www.chromestatus.com/features/5678767817097216
Just a heads up, on OSX, headless chrome doesn't behave completely like a background app. If you have a chrome already running, its window will be focused when you start headless mode.
Can anyone confirm this behaviour in other operating systems?
@rogeriopvl headless chrome steals focus on OSX.. the desirable thing to have is what PhantomJS does, run completely silent in the background.. Are there any flags that can be passed as chrome options to change this behaviour?
@captainjackrana exactly. That is a known problem. I'm not aware of any flag that changes that behaviour. But it seems to me that it is OSX causing it.
I know this is out of scope but out of interest...
I didn't find a way to specify opening the browser in the background. Stealing focus from the terminal window is just unwanted, for most cases, I guess.
I think it should be default.
There's a
flags
thing. I read the manual. There's nothing. Perhaps a trick with--display
?It points to this and this, which also don't seem to have what is required. Perhaps something with
--class
?This is relevant for all the other "real" browser launchers, as well.