Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to automatically open Google Chrome devtools?

Given that Selenium 2 closes the devtools window which contains my emulator profile saved under my user profile for chrome. Is there a way to trigger devtools to open using a selenium script?

Here is the info on the devtools window closing issue https://sites.google.com/a/chromium.org/chromedriver/help/devtools-window-keeps-closing

I feel a little exhausted trying some of these Chromium override parameters only one of which seems to work http://peter.sh/experiments/chromium-command-line-switches/

The one that had any affect is the following

options.addArguments("user-data-dir=/Path/to/chrome/profile");

If there is no way to open the dev tools window or panel, is there a way to initialize the emulator?

like image 315
Jack Shultz Avatar asked Jan 29 '14 00:01

Jack Shultz


People also ask

How do I force DevTools to open?

To open the developer console window on Chrome, use the keyboard shortcut Ctrl Shift J (on Windows) or Ctrl Option J (on Mac). Alternatively, you can use the Chrome menu in the browser window, select the option "More Tools," and then select "Developer Tools."

What is the shortcut to open DevTools in Chrome?

You can quickly open the DevTools by simply hitting the F12 key. In most cases though, you also want to inspect an element on a page. There's a special shortcut that gets you there even faster: hitting Ctrl+Shift+C will open the DevTools and invoke the inspector tool.

How do I open DevTools in the same window in Chrome?

In the developer Tool Window, On the top right corner you'll see three vertical dots. click it, and on the top you'll see "Dock Side" option. From this option you can change the setting.. i.e. to open the developer tool in the same webpage..


1 Answers

at the terminal, type the following -

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --auto-open-devtools-for-tabs
like image 114
snikt Avatar answered Sep 18 '22 15:09

snikt