Open DevTools undocked when using Selenium with Capybara

1,094 views
Skip to first unread message

Mitch VanDuyn

unread,
Dec 22, 2017, 1:58:27 PM12/22/17
to Google Chrome Developer Tools
I am successfully getting DevTools to be present when using capybara, but I would like the dev tools window to be unattached.

I am using this code at the moment:


    options = {
      args
: %w[auto-open-devtools-for-tabs],     # this works yeah!
      prefs
: { 'devtools.open_docked' => false } # this has no effect
     
# nor do any of these: devtools: {open_docked: false} / "devtools.currentDockState" => "undocked" / devtools: {currentDockState: :undocked} / etc
   
}
    capabilities
= Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: options)

   
Capybara::Selenium::Driver.new(app, browser: :chrome, desired_capabilities: capabilities)

Much obliged for any help.  Also I have this SO question open if you care to answer there: https://stackoverflow.com/questions/47932301/setting-chrome-devtools-open-docked-to-false-in-selenium-webdriver



Reply all
Reply to author
Forward
0 new messages