1

I know how to start Chrome with the DevTools open so please don't tell me it is a duplicate of How to open Chrome Developer console in Selenium WebDriver using JAVA


I'm trying to have the DevTools open to a specific panel. By default it opens on the Elements panel but I want it to open on the Console panel instead:

enter image description here

I've seen this command line switch --devtools-flags but I haven't found any example usage of it. Essentially what I'm trying to achieve is something similar to that. Obviously that doesn't work but you get the gist:

const { Options } = require('selenium-webdriver/chrome');
// …
const options = new Options().addArguments([
  'auto-open-devtools-for-tabs',
  'devtools-flags="panel=console"' /* <- That doesn't work. What else would?  */
]);
// …
customcommander
  • 14,568
  • 4
  • 48
  • 68

0 Answers0