Sulteric
Sulteric

Reputation: 527

Headless Chrome and Selenium on Windows?

I've seen that headless Chrome came out in some form last month and I've seen that it can be interacted with via Selenium but the articles I've seen mostly mention Linux and MacOS. Is this available for windows (7 and /or 10) yet?

Upvotes: 11

Views: 9029

Answers (5)

Mesut GUNES
Mesut GUNES

Reputation: 7401

I am using Chromedriver headless mode with the version 2.33 with the following config for Capybara:

Capybara.register_driver :chrome_headless do |app|
  args = ["--window-size=1280,1696", "--no-sandbox", "--headless", "--disable-gpu", "--disable-infobars", "--disable-notifications"]  
  Capybara::Selenium::Driver.new(app, {:browser => :chrome, :args => args})
end

Upvotes: 1

danwellman
danwellman

Reputation: 9253

I've been using Chrome in headless mode for months, with Chrome 59 on Windows.

My Karma config (for a custom Chrome headless) is as follows:

browsers: ['Chrome_headless'],
customLaunchers: {
    Chrome_headless: {
        base: 'Chrome',
        flags: ['--headless', '--disable-gpu', '--disable-plugins', '--window-size=0,0', '--window-position=-9999,0']
    }
},

There is no visible window with these commands.

However, updating to Chrome 60 seems to have killed this config as it no longer works (as of today)

Upvotes: 2

cocorossello
cocorossello

Reputation: 1357

It's working right now in chrome 59 with chromedriver 2.31 (just released). The only annoying thing is an empty window popping up at the beginning (just a visual effect) which will be removed in chrome 60 (should be about to release)

Upvotes: -1

AtachiShadow
AtachiShadow

Reputation: 392

The Headless mode for Windows is available in Chrome 60 beta, and the stable version is likely to be also in the 60th version.

https://www.google.com/chrome/browser/beta.html

There are no differences in the launch of Selenium

Upvotes: 5

doberkofler
doberkofler

Reputation: 10351

Yes, I use it on windows but with version 59 (beta) there is still an empty window popping up.

Upvotes: 3

Related Questions