How to run tests in Chrome with the console docked at the bottom, not the right?

Whenever I launch Karma on Chrome, a new Chrome window appears. When I open the console in this Chrome Window, the console appears on the right side. I prefer the console attached to the base, so I always take it off - kind of annoying.

How can I get Karma to launch Chrome from the console attached at the bottom?

+6
source share
1 answer

There seems to be no easy way to do this.

Although you could specify custom launch options for Chromium, there is no option that controls the position of devtool. (Although there are --auto-open-devtools-for-tabs , which may also be convenient in your case.)

However, there is a good hack described in the related issue :

The brute force approach should pass the --user-data-dir flag to the custom launcher:

 browsers: ['Chrome'], customLaunchers: { Chrome_DevTools_Saved_Prefs: { base: 'Chrome', flags: ['--user-data-dir=./tests/config/.chrome_dev_user'] } } 

then

 karma start --browsers Chrome_DevTools_Saved_Prefs 

This will allow you to reuse your profile. If you want to test using the new profile, use the standard Chrome launchpad or destroy the user data directory.

UPDATE : as @KFunk points out, this case is best described in the Karma documentation :

 customLaunchers: { Chrome_with_debugging: { base: 'Chrome', chromeDataDir: path.resolve(__dirname, '.chrome') } } 
+6
source

All Articles