Git Product home page Git Product logo

chromedriver-helper's Introduction

NOTICE: This gem is out of support as of 2019-03-31

See #83 for details.


Concourse CI

Easy installation and use of chromedriver, the Chromium project's Selenium webdriver adapter.

Description

chromedriver-helper installs an executable, chromedriver-helper, in your gem path, and configures Selenium to invoke it as the web driver.

This script will, if necessary, download the appropriate binary for your platform and install it into ~/.chromedriver-helper, then exec it. Easy peasy!

Individual projects can even select which version of chromedriver they want to run.

Make sure the gem is being required in order to configure the Selenium::WebDriver::Chrome.driver_path:

require "chromedriver-helper"

Otherwise you may see failures like "unable to connect to chromedriver 127.0.0.1:9515 (Selenium::WebDriver::Error::WebDriverError)" when Selenium runs the wrong executable.

Usage

In a Rails project

If you're using Bundler and Capybara in a Rails project, it's as easy as:

# Gemfile
gem "selenium-webdriver"
gem "chromedriver-helper"

then, in your spec setup:

Capybara.register_driver :selenium do |app|
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
end

Standalone

If you're using it standlone just to manage chromedriver binaries,

# Gemfile
gem "chromedriver-helper"

Then just run the executable script:

chromedriver-helper

which will download chromedriver if necessary and exec it.

Configuration

There are some commandline options that can be sent to chromedriver as options to Capybara::Selenium::Driver.new. The supported options can be discovered by looking at the Selenium source code here:

https://github.com/SeleniumHQ/selenium/blob/master/rb/lib/selenium/webdriver/chrome/service.rb

As of this writing, the supported options are:

  • log_path
  • url_base
  • port_server
  • whitelisted_ips
  • verbose
  • silent

An example usage would be:

Capybara::Selenium::Driver.new(app, browser: :chrome,
  driver_opts: {
    log_path: '/tmp/chrome.log',
    verbose: true
  })

Updating to latest chromedriver

You can always update to the latest version of chromedriver:

chromedriver-update

Having problems updating?

If for whatever reason you're having problems getting chromedriver-helper to update to the latest chromedriver, try this:

  1. Delete the directory $HOME/.chromedriver-helper
  2. Run chromedriver-update

Specifying a version

If you want to run a specific version of chromedriver in your project, you can set the version in you testing setup like so:

Chromedriver.set_version "2.24"

Or, from the command line, you can choose a system-wide default:

chromedriver-update 2.24

Support

The code lives at http://github.com/flavorjones/chromedriver-helper. Open a Github Issue, or send a pull request! Thanks! You're the best.

Known Issues

chromedriver-helper affects other projects on my system

v1.2.0 and earlier installed an executable named chromedriver, which may cause confusion for apps on your system that are not using chromedriver-helper. v2.0.0 and later do not cause this problem.

The common symptom is an error message that looks like this:

Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver 127.0.0.1:9515

First, confirm that we're talking about the same thing by running:

bundle exec ruby -e "system('chromedriver -v')"

and making sure you see something like:

.../rubygems_integration.rb:462:in `block in replace_bin_path': can't find executable chromedriver for gem chromedriver-helper (Gem::Exception)

If you see this message, then uninstall all versions of chromedriver-helper prior to v2.0.0; and make sure your other projects have updated to v2.0.0 or later.

(You can read more about this issue at #57.)

CentOS 6 and 7

Some versions of chromedriver won't run on CentOS 6 and 7 due to the problems explained here. The error messages look something like:

chromedriver: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /home/vagrant/.chromedriver-helper/linux64/chromedriver)
chromedriver: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by /home/vagrant/.chromedriver-helper/linux64/chromedriver)
chromedriver: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /home/vagrant/.chromedriver-helper/linux64/chromedriver)

You can get chromedriver to work on these systems by running the install_chrome.sh script on the page linked to above, and then making sure your chromedriver process has LD_LIBRARY_PATH set so that /opt/google/chrome/lib is present, e.g.

$ LD_LIBRARY_PATH=/opt/google/chrome/lib chromedriver-helper
Starting ChromeDriver 2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f) on port 9515
Only local connections are allowed.

License

MIT licensed, see LICENSE.txt for full details.

Credit

The idea for this gem comes from @brianhempel's project chromedriver-gem which, despite the name, is not currently published on http://rubygems.org/.

Some improvements on the idea were taken from the installation process for standalone Phusion Passenger.

chromedriver-helper's People

Contributors

alishutc avatar duncan-bayne avatar elementc avatar flavorjones avatar ibrahima avatar jamiecobbett avatar jonny5 avatar ksylvest avatar marques-work avatar mars avatar mcary avatar mfazekas avatar odlp avatar p8 avatar paulirish avatar saraid avatar y-yagi avatar yatmsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chromedriver-helper's Issues

Add FreeBSD support?

Currently, chromedriver-helper supports 64-bit and 32-bit Linux, MS Windows, and OSX.

When installed on a FreeBSD system, it breaks Chromedriver by overriding system Chromedriver with a broken .rbenv shim.

Possible fixes include a combination of:

  1. Not installing a shim on unsupported systems.
  2. Installing a pass-through shim for the system Chromedriver on unsupported systems.
  3. Adding support for FreeBSD.

I suspect either (1) or (2) is worthwhile, regardless of whether (3) is implemented.

Not executable: chromedriver-helper

I've recently installed Rails on windows 10 and it's working but when I run rake test on any project, it gives me this error:

Selenium::WebDriver::Error::WebDriverError: not executable: "C:/Ruby24- 
x64/lib/ruby/gems/2.4.0/gems/chromedriver-helper-2.1.0/bin/chromedriver-helper"
H:/Depot/config/application.rb:7:in `<top (required)>'
H:/Depot/Rakefile:4:in `require_relative'
H:/Depot/Rakefile:4:in `<top (required)>'

And I couldn't figure out what might be causing this error. Or reasons why/when chromedriver-helper fails to be executed.

Chromedriver picks up wrong version

I called Chromedriver.set_version "2.36" in spec helper files and also chromedriver-update 2.36 in terminal.

ls ~/.chromedriver-helper shows 2.35 2.36 but when I run the specs I run into this issue:

     Selenium::WebDriver::Error::UnknownError:                              
       unknown error: call function result missing 'value'                  
         (Session info: headless chrome=65.0.3325.181)                      
         (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.13.0-38-generic x86_64)

The above issue seems to happen in versions before 2.34 but I don't have this version in ~/.chromedriver-helper.

So I don't even see where 2.34 might come from so maybe you have an idea regarding this issue?

As this is a desktop system, there is a regular chrome browser running but I also have chromedriver 2.36 explicitely running in another tab:

$ chromedriver
Starting ChromeDriver 2.36.540471 (9c759b81a907e70363c6312294d30b6ccccc2752) on port 9515
Only local connections are allowed.

Thank you in advance!

Installing specific version of chromedriver

I need to install a specific version of chromedriver, specifically 2.2.0 for use on CircleCI in my rspec test setup. Is there a way to configure this through this gem, or should I be looking elsewhere?

Seeking new maintainer

Hi there,

I have not coded in Rails or used chromedriver in quite some time, and so I'm pretty far from the day-to-day needs of most users of chromedriver-helper. To be honest, there are some design decisions that need to be made, and work that needs to be done; and I don't have the well-formed opinions or the motivation that a daily user of the gem might have.

So I'm seeking someone to help maintain this gem; or even take it over entirely. Please comment on this github issue if you're interested!

Some things that need doing:

  • we need to make a decision about how the gem should determine what version of chromedriver to download (#78, #79)
  • window support is apparently not working as well as it once did and there's no clear solution (#19)

Thanks for reading.

Mention "require" in README?

I've been having some issues that might be related to PR #58, which changes the chromedriver executable file name to chromedriver-helper:

  unable to connect to chromedriver 127.0.0.1:9515 (Selenium::WebDriver::Error::WebDriverError)

I'm using this outside of Rails in a standalone test suite to test an app that is developed separately; not sure if that has an impact. So my Gemfile contains:

# no rails
gem "cucumber"
gem "rspec-expectations"
gem "pry"
gem "capybara"
gem "selenium-webdriver"
gem "chromedriver-helper"

I found that Selenium::WebDriver::Chrome.driver_path was nil after trying to visit a page (after rescuing from the failure).

The problem was that I was never loading the new chromedriver-helper code to set the custom driver_path. I added this to features/support/env.rb and my scenario started working:

require 'chromedriver-helper'

Perhaps the README could mention this in the Standalone section? I did look there for how to install it.

I'm happy to submit a doc PR if this sounds helpful.

No options to set log log-level and log-path

Hi 👋 I couldn't find any options to enable and redirect logging for chromedriver.
The chromedriver itself has --log-level and --log-path command line options.
So for debugging and such, it would be very helpful if there was an easy way to set these options in my spec_helper or environment.

NOTICE: Ending support for this gem

Ahoy, Rubyists.

This issue, related to #80 (and through that, to #78 and #79), intends to:

  1. Give public notice of ending support for chromedriver-helper, and deprecating it in favor of the webdrivers gem which has very nearly a superset of the functionality.
  2. Provide a punch list to track what needs to be done to wind down this gem responsibly, and provide transparency into the state of support/deprecation.

More to follow.

chromedriver & chromedriver-update throws exception "Could not unzip http...."

Hey Mike.

I upgraded to OS X Mavericks (10.9) today.
Then bundle installed for a new project I'm working on.
When I run the chromedriver or chromedriver-update commands I get this error.

I've used chromedriver-helper in the past on other projects and installed Mavericks today. Hope I'm not offering you a red herring by mentioning that.

Curious if anyone has mentioned this to you. Let me know if there's anything I can do / more info to provide.

chromedriver-update fails

The most recent Chrome update introduced a breaking change.

So, I unsuccessfully attempted the built-in chromedriver updater.

% chromedriver-update
curl: (6) Could not resolve host: http; nodename nor servname provided, or not known
/Users/mars/.rvm/gems/ruby-1.9.3-p392/gems/chromedriver-helper-0.0.5/lib/chromedriver/helper.rb:23:in `block in download': Could not download http: (RuntimeError)
  from /Users/mars/.rvm/gems/ruby-1.9.3-p392/gems/chromedriver-helper-0.0.5/lib/chromedriver/helper.rb:20:in `chdir'
  from /Users/mars/.rvm/gems/ruby-1.9.3-p392/gems/chromedriver-helper-0.0.5/lib/chromedriver/helper.rb:20:in `download'
  from /Users/mars/.rvm/gems/ruby-1.9.3-p392/gems/chromedriver-helper-0.0.5/lib/chromedriver/helper.rb:31:in `update'
  from /Users/mars/.rvm/gems/ruby-1.9.3-p392/gems/chromedriver-helper-0.0.5/bin/chromedriver-update:5:in `<top (required)>'
  from /Users/mars/.rvm/gems/ruby-1.9.3-p392/bin/chromedriver-update:19:in `load'
  from /Users/mars/.rvm/gems/ruby-1.9.3-p392/bin/chromedriver-update:19:in `<main>'
  from /Users/mars/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
  from /Users/mars/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'

As a workaround, I manually downloaded & copied the newest chromedriver over the old one.

Version selection with LATEST_RELEASE is deprecated

We've been getting chrome not reachable errors in our CircleCI builds since Chrome 73 was released. It seemed like chromedriver-helper was still installing Chromedriver 2.46 as the error message showed

Selenium::WebDriver::Error::WebDriverError:
  chrome not reachable
    (Session info: headless chrome=73.0.3683.75)
    (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.10.0-35-generic x86_64)

Currently chromedriver-helper fetches the latest chromedriver version via https://chromedriver.storage.googleapis.com/LATEST_RELEASE. It's now deprecated as in the thread, and we should switch to the new way of version selection.

We are testing if updating to the matching version manually will resolve the issue for the time being:

chromedriver-update 73.0.3683.68

Old chromedriver binary returns EOFError

After installing chromedriver helper, I see:

.rvm/gems/ruby-2.3.0/bin/chromedriver -v
ChromeDriver 2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4)

When I try to load it from my code, it returns an EOFError. Manually upgrading the chromedriver binary to ChromeDriver 2.25.426935 (820a95b0b81d33e42712f9198c215f703412e1a1) fixed the problem.

Can we update chromedriver-helper to use latest binary?

Doesn't work for me on OS X

Hi, chromedriver-helper didn't work for me on OS X. Instead, brew install chromedriver worked fine. Sorry, I'm not sure how to debug the problem, but I wanted to let you know.

unable to connect to chromedriver http://127.0.0.1:9515 (Selenium::WebDriver::Error::WebDriverError)
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/chrome/service.rb:50:in `start'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/chrome/bridge.rb:15:in `initialize'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/driver.rb:37:in `new'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/driver.rb:37:in `for'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver.rb:67:in `for'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/selenium/driver.rb:13:in `browser'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/selenium/driver.rb:69:in `find_xpath'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/node/base.rb:107:in `find_xpath'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/query.rb:110:in `block in resolve_for'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/node/base.rb:80:in `synchronize'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/query.rb:106:in `resolve_for'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/node/matchers.rb:122:in `block in assert_no_selector'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/node/base.rb:84:in `synchronize'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/node/matchers.rb:121:in `assert_no_selector'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/session.rb:675:in `block (2 levels) in <class:Session>'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/session.rb:104:in `reset!'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara.rb:257:in `block in reset_sessions!'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara.rb:257:in `each'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara.rb:257:in `reset_sessions!'
      /Users/dan/.rvm/gems/ruby-2.1.2/gems/capybara-2.4.1/lib/capybara/cucumber.rb:8:in `After'

Also:

$ chromedriver-update 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: http
/Users/dan/.rvm/gems/ruby-2.1.2/gems/chromedriver-helper-0.0.5/lib/chromedriver/helper.rb:23:in `block in download': Could not download http: (RuntimeError)
    from /Users/dan/.rvm/gems/ruby-2.1.2/gems/chromedriver-helper-0.0.5/lib/chromedriver/helper.rb:20:in `chdir'
    from /Users/dan/.rvm/gems/ruby-2.1.2/gems/chromedriver-helper-0.0.5/lib/chromedriver/helper.rb:20:in `download'
    from /Users/dan/.rvm/gems/ruby-2.1.2/gems/chromedriver-helper-0.0.5/lib/chromedriver/helper.rb:31:in `update'
    from /Users/dan/.rvm/gems/ruby-2.1.2/gems/chromedriver-helper-0.0.5/bin/chromedriver-update:5:in `<top (required)>'
    from /Users/dan/.rvm/gems/ruby-2.1.2/bin/chromedriver-update:23:in `load'
    from /Users/dan/.rvm/gems/ruby-2.1.2/bin/chromedriver-update:23:in `<main>'
    from /Users/dan/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
    from /Users/dan/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'

Doc question

If you want to run a specific version of chromedriver in your project, you can set the version in you testing setup like so:

Chromedriver.set_version "2.24"

Where is the in you testing setup? per the README.

certificate verify failed (self signed certificate in certificate chain) (OpenSSL::SSL::SSLError)

I'm trying to run chromedriver-update but I get the following error. Anything I could try to correct this? I was able to install chromedriver manually because they allowed an option for passing the following argument --no-certificate-check

Also not sure if it is relevant, but I'm working within Windows' WSL Ubuntu.

daveomcd@mcdonald-PC9020:~/rails_projects/sample$ chromedriver-update
Traceback (most recent call last):
        19: from /home/daveomcd/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:15:in `<main>'
        18: from /home/daveomcd/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:15:in `eval'
        17: from /home/daveomcd/.rvm/gems/ruby-2.5.1/bin/chromedriver-update:23:in `<main>'
        16: from /home/daveomcd/.rvm/gems/ruby-2.5.1/bin/chromedriver-update:23:in `load'
        15: from /home/daveomcd/.rvm/gems/ruby-2.5.1/gems/chromedriver-helper-2.1.0/bin/chromedriver-update:5:in `<top (required)>'
        14: from /home/daveomcd/.rvm/gems/ruby-2.5.1/gems/chromedriver-helper-2.1.0/lib/chromedriver/helper.rb:42:in `update'
        13: from /home/daveomcd/.rvm/gems/ruby-2.5.1/gems/chromedriver-helper-2.1.0/lib/chromedriver/helper.rb:63:in `google_code_parser'
        12: from /home/daveomcd/.rvm/gems/ruby-2.5.1/gems/chromedriver-helper-2.1.0/lib/chromedriver/helper.rb:63:in `new'
        11: from /home/daveomcd/.rvm/gems/ruby-2.5.1/gems/chromedriver-helper-2.1.0/lib/chromedriver/helper/google_code_parser.rb:14:in `initialize'
        10: from /home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/open-uri.rb:165:in `open_uri'
         9: from /home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/open-uri.rb:224:in `open_loop'
         8: from /home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/open-uri.rb:224:in `catch'
         7: from /home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/open-uri.rb:226:in `block in open_loop'
         6: from /home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/open-uri.rb:755:in `buffer_open'
         5: from /home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/open-uri.rb:337:in `open_http'
         4: from /home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:909:in `start'
         3: from /home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
         2: from /home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:981:in `connect'
         1: from /home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/protocol.rb:44:in `ssl_socket_connect'
/home/daveomcd/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/net/protocol.rb:44:in `connect_nonblock': SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain) (OpenSSL::SSL::SSLError)

how can I launch with Developer console open?

I am using chromedriver via Capybara on a Mac. I am using Capybara 2.7.1 on a Rails 4.1.14.2 app

I was wondering if there's a way to launch it with that Developer console open so that I can fall into the debugger inside of my javascript?

If I open the console fast enough, I sometimes am able to do this successfully and actually fall into the debugger. However, I've noticed that I must do Cmd-Option-I about 4 times (or 5) times before Chrome actually opens the console. developer 😢 . if I could launch it with the dev-console open it seems like it would fall into debugger automatically for me.

I am using 50.0.2661.102 (64-bit)

Error: unable to connect to chromedriver http://127.0.0.1:9515 (Selenium::WebDriver::Error::WebDriverError)

File name: sign_in_spec.rb

require "spec_helper"

RSpec.describe "the signin process", :type => :feature do

  it "signs me in" do
    visit '/'
    expect(page).to have_content 'About Zeit.io'
  end
end

File name: spec_helper.b

require "bundler/setup"
require "capybara/rspec"
require "selenium-webdriver"
require "frontend_end_to_end"


RSpec.configure do |config|
  # Enable flags like --only-failures and --next-failure
  config.example_status_persistence_file_path = ".rspec_status"

  config.expect_with :rspec do |c|
    c.syntax = :expect
  end

  # config.before(:each, type: :feature) do
  #   # Note (Mike Coutermarsh): Make browser huge so that no content is hidden during tests
  #   Capybara.current_session.driver.browser.manage.window.resize_to(2_500, 2_500)
  # end
end

Capybara.register_driver :selenium do |app|
  Capybara::Selenium::Driver.new(
    app,
    browser: :chrome,
    switches: %w[--ignore-certificate-errors --disable-popup-blocking])
end

Capybara.javascript_driver = :chrome

Capybara.configure do |config|
  config.default_max_wait_time = 20 # seconds
  config.default_driver        = :selenium
end

Capybara.app_host = 'http://127.0.0.1:8080/'

When I ran rspec spec, got the below error:

the signin process
2017-06-27 18:42:12 WARN Selenium [DEPRECATION] :args or :switches is deprecated. Use Selenium::WebDriver::Chrome::Options#add_argument instead.
  signs me in (FAILED - 1)

Failures:

  1) the signin process signs me in
     Failure/Error: visit '/'

     Selenium::WebDriver::Error::WebDriverError:
       unable to connect to chromedriver 127.0.0.1:9515
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/service.rb:130:in `connect_until_stable'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/service.rb:74:in `block in start'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/socket_lock.rb:41:in `locked'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/service.rb:71:in `start'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/chrome/driver.rb:52:in `initialize'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/driver.rb:46:in `new'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/driver.rb:46:in `for'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver.rb:86:in `for'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/capybara-2.14.3/lib/capybara/selenium/driver.rb:23:in `browser'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/capybara-2.14.3/lib/capybara/selenium/driver.rb:67:in `visit'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/capybara-2.14.3/lib/capybara/session.rb:269:in `visit'
     # /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/capybara-2.14.3/lib/capybara/dsl.rb:50:in `block (2 levels) in <module:DSL>'
     # ./spec/signin_spec.rb:6:in `block (2 levels) in <top (required)>'

Finished in 20.27 seconds (files took 0.55112 seconds to load)
2 examples, 1 failure

Failed examples:

rspec ./spec/signin_spec.rb:5 # the signin process signs me in

/Users/arup/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect': Failed to open TCP connection to 127.0.0.1:9515 (Connection refused - connect(2) for "127.0.0.1" port 9515) (Errno::ECONNREFUSED)
	from /Users/arup/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
	from /Users/arup/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
	from /Users/arup/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
	from /Users/arup/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/net/http.rb:878:in `connect'
	from /Users/arup/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
	from /Users/arup/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/net/http.rb:852:in `start'
	from /Users/arup/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/net/http.rb:584:in `start'
	from /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/service.rb:93:in `connect_to_server'
	from /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/service.rb:116:in `stop_server'
	from /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/service.rb:79:in `stop'
	from /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/service.rb:69:in `block in start'
	from /Users/arup/.rvm/gems/ruby-2.3.3@e2e-dockingtest-app/gems/selenium-webdriver-3.4.3/lib/selenium/webdriver/common/platform.rb:138:in `block in exit_hook'

I am on macos sierra.
Ruby version is: ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
My gemspec looks like:

spec.add_development_dependency "bundler", "~> 1.14"
  spec.add_development_dependency "rake", "~> 10.0"
  spec.add_development_dependency "rspec", "~> 3.0"
  spec.add_development_dependency "capybara"
  spec.add_development_dependency "selenium-webdriver"
  spec.add_development_dependency 'chromedriver-helper', '~> 1.0'

Does chromedriver-helper automatically update the chromedriver version?

Hello,

I am wondering, does the chromedriver-helper gem automatically update the chromedriver executable version when a new latest version is detected, or must the CLI command chromedriver-update be executed manually to trigger the update? My apologies if there was a better forum to ask this question than GH Issues. Thank you.

chromedriver-helper breaks projects not using it

I have a project not using chromedriver-helper. I'm running my tests via:

bin/rails test:system

this passes. But once i bundle install a project which uses chromedriver-helper or i gem install chromedriver-helper i can no longer run my tests.

gem install chromedriver-helper # or bundle install on a project using chromedriver-helper
$ bin/rails test:system
Run options: --seed 13360

# Running:

E

Error:
CustomersTest#test_login:
Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver 127.0.0.1:9515
    test/system/customers_test.rb:5:in `block in <class:CustomersTest>'

Running the chromedriver from irb shows the reason for the error:

$ bundle exec irb
2.4.0 :001 > system('chromedriver -v')
.../rubygems_integration.rb:458:in `block in replace_bin_path': can't find executable chromedriver for gem chromedriver-helper. chromedriver-helper is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception)

Allow setting an environment variable to skip installation, for systems on which a compatible chromedriver is already installed

We just had some failing builds on Semaphore CI because chromedriver-helper is installing the latest chromedriver version while Semaphore is not providing the latest Chrome. The workaround is to either install the latest Chrome or lock chromedriver to a compatible version (howto). But that will lead to an outdated chromedriver version one day. Some people also prefer to use their system's chromedriver instead of installing a new one through chromedriver-helper.

How difficult would it be to not install a new chromedriver if the system provides one already? It's how I expected this gem to work actually.

Invoking chromedriver-update without a version should always update?

I was working with a colleague to update their chromedriver and noticed that chromedriver-update, when invoked without a version argument, no-ops if a version of chromedriver is already downloaded. This seems unintuitive. I'd expect invoking chromedriver-update to fetch the latest version of chromedriver regardless of the currently-installed version. Is this intentional behavior? If so, even outputting a message informing the user that no update will be performed unless they remove the current version would be helpful. Or supporting an override flag to force the upgrade. Or anything except for exiting silently with no action. :)

Change log directory

Is it possible to change the log directory? When used with Rails app, for instance, ./log is great place for log files.

`Errno::ENOENT: No such file or directory` when trying to execute `chromedriver -v`

Hi,

I'm attempting to execute chromedriver in an alpine-based Docker container (as part of a test suite using Capybara).

System details as follows:

bash-4.3# rbenv version
2.3.1 (set by /root/.ruby-version)
bash-4.3# which chromedriver
/usr/local/rbenv/shims/chromedriver
bash-4.3# bundle show chromedriver-helper
/usr/local/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/chromedriver-helper-1.1.0
bash-4.3# ls -alh /root/.chromedriver-helper/2.33/linux64/chromedriver
-rwxr-xr-x    1 root     root        8.5M Dec  5 08:12 /root/.chromedriver-helper/2.33/linux64/chromedriver
bash-4.3# uname -a
Linux 65a0a1bfa8f9 4.9.49-moby #1 SMP Wed Sep 27 23:17:17 UTC 2017 x86_64 Linux

When I execute bundle exec chromedriver -v I expect to see version information in the output. Instead I get the following error:

bash-4.3# bundle exec chromedriver -v
bundler: failed to load command: chromedriver (/usr/local/rbenv/versions/2.3.1/bin/chromedriver)
Errno::ENOENT: No such file or directory - /root/.chromedriver-helper/2.33/linux64/chromedriver
  /usr/local/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/chromedriver-helper-1.1.0/lib/chromedriver/helper.rb:16:in `exec'
  /usr/local/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/chromedriver-helper-1.1.0/lib/chromedriver/helper.rb:16:in `run'
  /usr/local/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/chromedriver-helper-1.1.0/bin/chromedriver:5:in `<top (required)>'
  /usr/local/rbenv/versions/2.3.1/bin/chromedriver:23:in `load'
  /usr/local/rbenv/versions/2.3.1/bin/chromedriver:23:in `<top (required)>'

As can be seen from the above output, the system is failing to detect the existence of the .chromedriver-helper directory.

It may be worth noting that the OS as a chromedriver executable installed:

bash-4.3# /usr/bin/chromedriver -v
ChromeDriver 2.27 (94b3700c8cfd6ef738a417983f710f6ab96b8638)

However, I would expect both to be able to co-exist.

Incorrectly running Windows Chromedriver on FreeBSD

➜  ~ ruby --version
ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-freebsd11.1]
➜  ~ which ruby
/home/duncan/.rbenv/shims/ruby
➜  ~ gem install chromedriver-helper
Successfully installed chromedriver-helper-1.1.0
Parsing documentation for chromedriver-helper-1.1.0
Done installing documentation for chromedriver-helper after 0 seconds
1 gem installed
➜  ~ rbenv rehash
➜  ~ chromedriver --version
/home/duncan/.chromedriver-helper/2.34/win/chromedriver.exe: 1: Syntax error: word unexpected (expecting ")")
➜  ~ uname -a
FreeBSD x220 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     [email protected]:/usr/obj/usr/src/sys/GENERIC  amd64

"Unable to either launch or connect to Chrome"

I'm guessing that this isn't directly related to chromedriver-helper, but I just started seeing this error consistently on a project using the helper and can't seem to track down the cause, so I'm curious if anyone else is seeing it.

Both on my dev machine and CI box (both Macs, one running Lion, one running Mountain Lion), I started seeing the following error today:

Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome (Selenium::WebDriver::Error::UnknownError)

Tried updating by Selenium-Webdriver gems, Chromedriver, Chrome itself, switching to Canary, etc., all to no avail. Doesn't seem to be related to my code as older versions that had passed are now failing. The weird thing is that Chrome does fire up, but it never goes to the URL for the test suite - it just hangs there with a blank page.

Anyway, out of curiosity - is anyone else seeing this or am I totally nuts? My hunch is that it's something related to a Chrome auto-update that broke the integration, but I have no way of telling whether Chrome updated itself today or not.

Incorrect version of ChromeDriver downloaded since 2.10

unknown error: call function result missing 'value' for Selenium Send Keys even after chromedriver upgrade

https://stackoverflow.com/questions/49162667/unknown-error-call-function-result-missing-value-for-selenium-send-keys-even

Could we get a bump of chromedriver when you get a chance? I'm running into the error outlined in this stackoverflow.

$ bin/rails test test/system/redacted/redacted-test.rb -b
Run options: -b --seed 6133

# Running:

Puma starting in single mode...
* Version 3.11.3 (ruby 2.4.3-p205), codename: Love Song
* Min threads: 0, max threads: 1
* Environment: development
* Listening on tcp://0.0.0.0:37273
Use Ctrl-C to stop
[Screenshot]: test/dummy/tmp/screenshots/redacted.png
E

Error:
Redacted::RedactedTest#redacted:
Selenium::WebDriver::Error::UnknownError: unknown error: call function result missing 'value'
  (Session info: headless chrome=65.0.3325.162)
  (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.13.0-37-generic x86_64)
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/response.rb:32:in `initialize'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/http/common.rb:81:in `new'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/http/common.rb:81:in `create_response'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/http/default.rb:104:in `request'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/bridge.rb:164:in `execute'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/oss/bridge.rb:579:in `execute'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/remote/oss/bridge.rb:267:in `execute_script'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.9.0/lib/selenium/webdriver/common/driver.rb:211:in `execute_script'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/capybara-2.18.0/lib/capybara/selenium/driver.rb:91:in `execute_script'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/capybara-2.18.0/lib/capybara/selenium/node.rb:245:in `set_text'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/capybara-2.18.0/lib/capybara/selenium/node.rb:62:in `set'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/capybara-2.18.0/lib/capybara/node/element.rb:108:in `block in set'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/capybara-2.18.0/lib/capybara/node/base.rb:85:in `synchronize'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/capybara-2.18.0/lib/capybara/node/element.rb:106:in `set'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/capybara-2.18.0/lib/capybara/node/actions.rb:92:in `fill_in'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/capybara-2.18.0/lib/capybara/session.rb:808:in `block (2 levels) in <class:Session>'
    /home/meowsus/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/capybara-2.18.0/lib/capybara/dsl.rb:50:in `block (2 levels) in <module:DSL>'
    (eval):5:in `fill_in'
    /home/meowsus/redacted/test/system/redacted/redacted-test.rb:40:in `redacted'


bin/rails test test/system/redacted/redacted-test.rb:9

No output with 'which chromedriver' after installing 2.1.0

Upon installing the latest chromedriver-helper via bundler, running rspec produces the error "Unable to find chromedriver."

The command which chromedriver produces no output from my terminal.

If I were to set my Gemfile to use 1.2.0, which chromedriver produces /Users/pfong/.rvm/gems/ruby-2.5.1/bin/chromedriver

Any ideas on what might be preventing me from using chromedriver through the latest version of this gem?

Does not work with chromedriver 18

When run via capybara, raises:

Selenium::WebDriver::Error::WebDriverError: proxy must be of type dictionary, not null. Received: null

Using chromedriver version linux64_18.0.1022.0

Not working in rspec (calling in rails_helper.rb)

The automatic downloading (Chromedrier::Helper#download) does not work in rspec (or maybe rspec-rails), with the following error messages:

You can stub this request with the following snippet:

stub_request(:get, "https://chromedriver.storage.googleapis.com/").
  with(
    headers: {
	  'Accept'=>'*/*',
	  'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
	  'User-Agent'=>'Ruby'
    }).
  to_return(status: 200, body: "", headers: {})

I guess this is because rspec install the HTTP stubs before calling its helpers.

If chromedriver-helper uses external commands such as curl(1), it should work well, I think.

NameError: uninitialized constant Chromedriver in rails & rspec config

Calling Chromedriver.set_version 'XXX' in rspec config like rails_helper.rb causes NameError: uninitialized constant Chromedriver.

To resolve this, we need Gemfile line to be like:

gem 'chromedriver-helper', require: 'chromedriver/helper'

Environment: Rails 5.2.1, chromedriver-helper 2.0.1

Chromedriver helper downloading weird chromedriver version number

I'm running the circleci/ruby:2.4.4-node-browsers image on CircleCI and chromedriver-helper is pulling a weird version number on install for chromedriver.

irb(main):012:0> helper = Chromedriver::Helper.new
=> #<Chromedriver::Helper:0x000055f8af5f3ab8>
irb(main):013:0> helper.google_code_parser.newest_download_version.to_s
=> "70.0.3538.16"

And when I run bundle exec chromedriver-helper --version I get ChromeDriver 70.0.3538.16 (16ed95b41bb05e565b11fb66ac33c660b721f778).

The latest release version of chromedriver is 2.42. When I go to https://chromedriver.storage.googleapis.com/ I do see some weird version numbers like 70.0.3538.16 which doesn't make much sense.

<Contents>
<Key>70.0.3538.16/chromedriver_linux64.zip</Key>
<Generation>1537228578852463</Generation>
<MetaGeneration>1</MetaGeneration>
<LastModified>2018-09-17T23:56:18.852Z</LastModified>
<ETag>"aa7bb2d4a516464162c97ab62d676b88"</ETag>
<Size>3637278</Size>
</Contents>
<Contents>
<Key>70.0.3538.16/chromedriver_mac64.zip</Key>
<Generation>1537228580401426</Generation>
<MetaGeneration>1</MetaGeneration>
<LastModified>2018-09-17T23:56:20.401Z</LastModified>
<ETag>"4d01ffac43d8e63a6bb334dbb99010c0"</ETag>
<Size>5935851</Size>
</Contents>
<Contents>
<Key>70.0.3538.16/chromedriver_win32.zip</Key>
<Generation>1537228581777336</Generation>
<MetaGeneration>1</MetaGeneration>
<LastModified>2018-09-17T23:56:21.776Z</LastModified>
<ETag>"ed2a5a850121af095a61b816319cf42b"</ETag>
<Size>3536229</Size>
</Contents>

Since GoogleCodeParser is just pulling the max it's going to pull whatever is there. In the CircleCI docker file they use http://chromedriver.storage.googleapis.com/LATEST_RELEASE to grab the latest release version which does return 2.42. Maybe that's something that can be done here?

Initially when I ran into this issue I was getting Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver 127.0.0.1:9515 (unrelated to #57 because I had upgraded to chromedriver-helper 2.0.1 already). This may have been due to a temporary issue on Googles end with downloading the zip. Now tests are running just fine but with a weird chromedriver version.

Can't get this working in trivial case

chromedriver-helper does not seem to work in a virgin docker container with a new rails application.

What follows are the step by step to:

  • Add rails
  • Create a new rails application in a docker container
  • Enable mimi_racer
  • Add a user scaffold
  • Add libnss3 (which chrome seems to need and which is not installed by default)
  • Run the system tests - which do invoke chromedriver-helper but which do not work
➜  docker run -it -v $PWD:/empty -w /empty ruby bash
root@4b7f2d3dc8ac:/empty# gem install rails
...
38 gems installed
root@4b7f2d3dc8ac:/empty# rails new fail_helper
...
* bin/rails: spring inserted
root@4b7f2d3dc8ac:/empty# cd fail_helper/

<<EDIT Gemfile to enable mini_racer>>

root@4b7f2d3dc8ac:/empty/fail_helper# bundle
...
Bundled gems are installed into `/usr/local/bundle`
root@4b7f2d3dc8ac:/empty/fail_helper# rails g scaffold user name:string
...
      create    app/assets/stylesheets/scaffolds.scss
root@4b7f2d3dc8ac:/empty/fail_helper# bin/rails db:migrate RAILS_ENV=test
== 20190111231241 CreateUsers: migrating ======================================
-- create_table(:users)
   -> 0.0078s
== 20190111231241 CreateUsers: migrated (0.0079s) =============================

root@4b7f2d3dc8ac:/empty/fail_helper# apt-get update && apt-get install -y libnss3 # libnss3 is needed by chrome.
...
root@4b7f2d3dc8ac:/empty/fail_helper# bin/rails test:system
Run options: --seed 49850

# Running:

E

Error:
UsersTest#test_creating_a_User:
Selenium::WebDriver::Error::UnknownError: unknown error: cannot find Chrome binary
  (Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.9.125-linuxkit x86_64)
    test/system/users_test.rb:14:in `block in <class:UsersTest>'

So... what happened?

root@4b7f2d3dc8ac:/empty/fail_helper# ls ~/.chromedriver-helper/2.45/linux64/chromedriver
/root/.chromedriver-helper/2.45/linux64/chromedriver

<< It got installed... >>

root@4b7f2d3dc8ac:/empty/fail_helper# /root/.chromedriver-helper/2.45/linux64/chromedriver
Starting ChromeDriver 2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5) on port 9515
Only local connections are allowed.
[1547248893.082][SEVERE]: bind() failed: Cannot assign requested address (99)

<< It runs >>

It got installed and it runs - why is it not functioning in test:system?

I'm happy to create a project and/or dockerfile with this test case if that'd help.

Using with Rails: "uninitialized constant Selenium"

I just upgraded an existing Rails app to chromedriver-helper 2.0, and upon running my app I get this error:

bundler-1.16.4/lib/bundler/runtime.rb:84:in `rescue in block (2 levels) in require':
There was an error while trying to load the gem 'chromedriver-helper'.
Gem Load Error is: uninitialized constant Selenium
Backtrace for gem load error is:
chromedriver-helper-2.0.0/lib/chromedriver-helper.rb:1:in `<top (required)>'

Workaround: place the chromedriver-helper gem after selenium in app's Gemfile. E.g.

group :test do
  gem "selenium-webdriver"
  gem "chromedriver-helper" # must load after selenium
end

Support headless Chrome

Now that Chrome 59 has been released with support for headless mode, it'd be great if chromedriver-helper used the headless mode (by default). Or at the least, documented how to enable headless mode. I realize that this may require waiting on an updated version of chromedriver itself, but I wanted to make sure we don't forget about this nice new feature.

Use a compatible version of chromedriver

Similar to #77, the latest release of chromedriver is incompatible with the version of Chromium on my system.

It would be great if chromedriver-helper checked the version of Chromium and chose a working version automatically.

Specifically, I have

$ chromium-browser --version
Chromium 70.0.3538.77 Built on Ubuntu , running on Ubuntu 18.10

And ran into errors like

     Selenium::WebDriver::Error::SessionNotCreatedError:
       session not created: Chrome version must be between 71 and 75
         (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.9.125-linuxkit x86_64)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.