Code Monkey home page Code Monkey logo

webdrivers's Introduction

Webdrivers

Gem Version Tests

Run Selenium tests more easily with automatic installation and updates for all supported webdrivers.

Update: Future of this Project

With Google's new Chrome for Testing project, and Selenium's new Selenium Manager feature, what is required of this gem has changed.

If you can update to the latest version of Selenium (4.11+), please do so and stop requiring this gem. Provide feedback or raise issues to Selenium Project

If you cannot upgrade to Selenium 4.11, Webdrivers 5.3.0 will continue to support Ruby 2.6+ and Selenium 4.0 - 4.10

Webdrivers 6.0 To provide support for Selenium 3 and Ruby < 2.6 a 6.0 version is planned. It requires:

  • Creating a selenium-manager.gem based off of SeleniumHQ/selenium#12429
  • Re-implementing this gem to wrap selenium-manager.gem
  • Ensuring compatible with older versions of Selenium & Ruby

If anyone would like to help get Webdrivers 6 working, please let us know.

Description

webdrivers downloads drivers and directs Selenium to use them. Currently supports:

Works on macOS, Linux, Windows, and Windows Subsystem for Linux (WSL) v1 and v2. And do see the browser and OS specific notes at the bottom.

Usage

In your Gemfile:

gem 'webdrivers', '~> 5.0', require: false

In your project:

require 'webdrivers'

The drivers will now be automatically downloaded or updated when you launch a browser through Selenium.

Specific Drivers

If you want webdrivers to only manage specific drivers you can specify one or more as follows:

require 'webdrivers/chromedriver'
require 'webdrivers/geckodriver'
require 'webdrivers/iedriver'
require 'webdrivers/edgedriver'

Download Location

The default download location is ~/.webdrivers directory, and this is configurable:

Webdrivers.install_dir = '/webdrivers/install/dir'

Alternatively, you can define the path via the WD_INSTALL_DIR environment variable.

Version Pinning

If you would like to use a specific (older or beta) version, you can specify it for each driver. Otherwise, the latest (stable) driver will be downloaded and passed to Selenium.

# Chrome
Webdrivers::Chromedriver.required_version = '2.46'

# Firefox
Webdrivers::Geckodriver.required_version  = '0.23.0'

# Internet Explorer
Webdrivers::IEdriver.required_version     = '3.14.0'

# Edge (Chromium)
Webdrivers::Edgedriver.required_version   = '76.0.183.0'

You can explicitly trigger the update in your code, but this will happen automatically when the driver is initialized:

Webdrivers::Chromedriver.update

Caching Drivers

You can set Webdrivers to only look for updates if the previous check was longer ago than a specified number of seconds.

Webdrivers.cache_time = 86_400 # Default: 86,400 Seconds (24 hours)

Alternatively, you can define this value via the WD_CACHE_TIME environment variable. Only set one to avoid confusion.

Special exception for chromedriver and msedgedriver

Cache time will be respected as long as a driver binary exists and the major.minor.build versions of the browser and the driver match. For example, if you update Chrome or Edge to v76.0.123 and its driver is still at v76.0.100, webdrivers will ignore the cache time and update the driver to make sure you're using a compatible build version.

Proxy

If there is a proxy between you and the Internet then you will need to configure the gem to use the proxy. You can do this by calling the configure method.

Webdrivers.configure do |config|
  config.proxy_addr = 'myproxy_address.com'
  config.proxy_port = '8080'
  config.proxy_user = 'username'
  config.proxy_pass = 'password'
end

SSL_connect errors

If you are getting an error like this (especially common on Windows):

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

Add the following to your Gemfile:

gem "net_http_ssl_fix"

Add the following to your code:

require 'net_http_ssl_fix'

Other solutions are documented on the RubyGems website.

Rake tasks

Each driver has its own set of rake tasks (with Railtie support) that you can call once before executing the tests. These are especially useful if you're running tests in parallel and want to avoid performing an update check per thread.

If you are using Rails default configuration the webdrivers gem will only be loaded in the test group so you will need to specify the test environment when using the tasks:

RAILS_ENV=test rails webdrivers:chromedriver:update

If you are not using Rails, you'll need to load them into your Rakefile like this:

require 'webdrivers'
load 'webdrivers/Rakefile'

The full list of available tasks is:

$ bundle exec rake -T
rake webdrivers:chromedriver:remove           # Force remove chromedriver
rake webdrivers:chromedriver:update[version]  # Remove and download updated chromedriver if necessary
rake webdrivers:chromedriver:version          # Print current chromedriver version
rake webdrivers:edgedriver:remove             # Force remove msedgedriver
rake webdrivers:edgedriver:update[version]    # Remove and download updated msedgedriver if necessary
rake webdrivers:edgedriver:version            # Print current msedgedriver version
rake webdrivers:geckodriver:remove            # Force remove geckodriver
rake webdrivers:geckodriver:update[version]   # Remove and download updated geckodriver if necessary
rake webdrivers:geckodriver:version           # Print current geckodriver version
rake webdrivers:iedriver:remove               # Force remove IEDriverServer
rake webdrivers:iedriver:update[version]      # Remove and download updated IEDriverServer if necessary
rake webdrivers:iedriver:version              # Print current IEDriverServer version

These tasks respect the WD_INSTALL_DIR, WD_CACHE_TIME, WD_CHROME_PATH, and WD_EDGE_CHROME_PATH environment variables, which can also be passed through the rake command:

$ bundle exec rake webdrivers:chromedriver:update[2.46] webdrivers:geckodriver:update[0.24.0] WD_CACHE_TIME=86_400 WD_INSTALL_DIR='my_dir'
2019-05-20 19:03:01 INFO Webdrivers Updated to chromedriver 2.46.628388
2019-05-20 19:03:04 INFO Webdrivers Updated to geckodriver 0.24.0

Please note that these tasks do not use any of the configurations from your project (code) and only respect the ENV variables and the version (optional) passed to the rake tasks.

Logging

The logging level can be configured for debugging purpose:

Webdrivers.logger.level = :DEBUG

Browser & OS Specific Notes

Chrome/Chromium

The version of chromedriver will depend on the version of Chrome you are using it with:

  • For versions >= 70, the downloaded version of chromedriver will match the installed version of Google Chrome. More information here.
  • For versions <= 69, chromedriver version 2.41 will be downloaded.
  • For beta versions, you'll have to require the beta version of chromedriver using Webdrivers::Chromedriver.required_version.

The gem looks for the Chrome/Chromium version that chromedriver will use by default. You can override this behavior by providing a path to the browser binary you want to use:

Selenium::WebDriver::Chrome.path = '/chromium/install/path/to/binary'

Alternatively, you can define the path via the WD_CHROME_PATH environment variable.

This is also required if Google Chrome is not installed in its default location.

Chrome on Heroku

Follow the specific instructions here if you're using heroku-buildpack-google-chrome.

Microsoft Edge (Chromium)

Microsoft Edge (Chromium) support was added in v4.1.0. Notes from the Chrome/Chromium section apply to this browser as well.

Please note that msedgedriver requires selenium-webdriver v4.

WSLv1 support

While WSLv1 is not designed to run headful applications like Chrome, it can run exes; as such when found to be running in WSL, webdrivers will use Chrome on the Windows filesystem.

It's recommended that you install the new PowerShell (PS7) to avoid a known issue with the console font being changed when calling the old PowerShell (PS5).

WSLv2 support

Webdrivers will detect WSLv2 as running on Linux and use Chrome on the Linux filesystem.

WSLv2 doesn't support connecting to host ports out of the box, so it isn't possible to connect to Chromedriver on Windows without extra configurations, see: microsoft/WSL#4619. The simplest way to use Chromedriver with WSLv2 is to run Chrome headless on Linux.

Chrome and Edge on Apple M1 (arm64)

If you're switching from Intel to M1, you'll have to manually delete the existing Intel (mac64) driver before the M1 (arm64) build can be downloaded. Otherwise, you'll get an error: Bad CPU type in executable - ~/.webdrivers/chromedriver (Errno::E086)

Wiki

Please see the wiki for solutions to commonly reported issues.

Join us in the #webdrivers-gem channel on Slack if you have any questions.

License

The gem is available as open source under the terms of the MIT License, see LICENSE.txt for full details and copyright.

Contributing

Bug reports and pull requests are welcome on GitHub. Run bundle exec rake and squash the commits in your PRs.

webdrivers's People

Contributors

cheezy avatar entretechno-jeremiah avatar fabioxgn avatar g-rath avatar hron avatar ioquatix avatar jmccure avatar joe81 avatar kapoorlakshya avatar michaelhoste avatar ochko avatar okuramasafumi avatar orien avatar petergoldstein avatar rbclark avatar rbu avatar rhymes avatar richdownie avatar rossta avatar runephilosof-abtion avatar sadahiro-ono avatar shepmaster avatar stephannv avatar stephengroat avatar tietew avatar titusfortner avatar twalpole avatar utkarsh2102 avatar y-yagi avatar yahonda 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

webdrivers's Issues

#latest - Keys from #downloads are not sorted correctly.

Currently, for IEDriverServer, Common#latest returns 3.9 instead of the actual latest 3.12. I looked into the issue and looks like downloads.keys.sort isn't sorting incorrectly:

[1] pry(Webdrivers::IEdriver)> downloads.keys.sort
2018-05-31 19:21:12 DEBUG Webdrivers Found Site: http://selenium-release.storage.googleapis.com/
2018-05-31 19:21:12 DEBUG Webdrivers Versions previously located on downloads site: [2.39, 2.4, 2.41, 2.42, 2.43, 2.44, 2.45, 2.46, 2.47, 2.48, 2.49, 2.5, 2.51, 2.52, 2.53, 3.0, 3.1, 3.11, 3.12, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9]
=> [
    [ 0] 2.39,
    [ 1] 2.4,
    [ 2] 2.41,
    [ 3] 2.42,
    [ 4] 2.43,
    [ 5] 2.44,
    [ 6] 2.45,
    [ 7] 2.46,
    [ 8] 2.47,
    [ 9] 2.48,
    [10] 2.49,
    [11] 2.5,
    [12] 2.51,
    [13] 2.52,
    [14] 2.53,
    [15] 3.0,
    [16] 3.1,
    [17] 3.11,
    [18] 3.12,
    [19] 3.2,
    [20] 3.3,
    [21] 3.4,
    [22] 3.5,
    [23] 3.6,
    [24] 3.7,
    [25] 3.8,
    [26] 3.9
]

Apparently, decimal sorting is not as straight forward. Here is what works though: downloads.keys.sort_by { |x| x.to_s.scan(/\d+/).map(&:to_i) }

@titusfortner Do you have a better way in mind? If not, I can push a PR with this change.

Add Issue template.

#### Summary
Short summary of the bug or feature request.

#### Debug Info
Please provide the following information for bug reports:

* Operating system / CI Environment:
* Browser and version:

#### Expected Behavior
What you expect to happen.

#### Actual Behavior
What is actually happening: Error message, stack trace, DEBUG log if applicable (set `Webdrivers.logger.level = :DEBUG` after you require webdrivers)

[3.7.0] Doesn't work with chromium on Linux

I guess the issue is here. This checks for google-chrome while I, for example, use chromium. The code should be made to handle that scenario.

Errno::ENOENT:
  No such file or directory - google-chrome
# ./features/build/tmp/jrubyExec/gems/webdrivers-3.7.0/lib/webdrivers/chromedriver.rb:82:in `chrome_on_linux'
# ./features/build/tmp/jrubyExec/gems/webdrivers-3.7.0/lib/webdrivers/chromedriver.rb:64:in `chrome_version'
# ./features/build/tmp/jrubyExec/gems/webdrivers-3.7.0/lib/webdrivers/chromedriver.rb:55:in `release_version'
# ./features/build/tmp/jrubyExec/gems/webdrivers-3.7.0/lib/webdrivers/chromedriver.rb:19:in `latest_version'
# ./features/build/tmp/jrubyExec/gems/webdrivers-3.7.0/lib/webdrivers/common.rb:37:in `desired_version'
# ./features/build/tmp/jrubyExec/gems/webdrivers-3.7.0/lib/webdrivers/common.rb:16:in `update'
# ./features/build/tmp/jrubyExec/gems/webdrivers-3.7.0/lib/webdrivers/selenium.rb:7:in `driver_path'
# ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/chrome/driver.rb:39:in `initialize'
# ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/common/driver.rb:44:in `for'
# ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver.rb:86:in `for'
# ./features/build/tmp/jrubyExec/gems/capybara-3.15.0/lib/capybara/selenium/driver.rb:32:in `browser'
# ./features/build/tmp/jrubyExec/gems/capybara-3.15.0/lib/capybara/selenium/driver.rb:139:in `current_window_handle'
# ./features/build/tmp/jrubyExec/gems/capybara-3.15.0/lib/capybara/session.rb:438:in `current_window'
# ./features/spec_helper.rb:89:in `block in <main>'

VCR may block download of chromedriver

Hello,

I have encountered an issue when tests are configured to use VCR gem. Basically the request to download chromedriver is blocked and feature tests fail with message Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver.

The solution is to simply configure VCR to enable this particular request like so:

VCR.configure do |config|
  config.ignore_hosts 'chromedriver.storage.googleapis.com'
end

May I suggest adding this to README?

Avoid HTTP check if version installed matches version pinned in config

My config

require "webdrivers"
Webdrivers::Chromedriver.version = '74.0.3729.6'
Webdrivers.logger.level = :DEBUG

Output

➜ bin/rails test:system
Run options: --seed 1780

# Running:

Capybara starting Puma...
* Version 3.12.1 , codename: Llamas in Pajamas
* Min threads: 0, max threads: 4
* Listening on tcp://127.0.0.1:51226
2019-04-29 12:58:13 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com
2019-04-29 12:58:14 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-29 12:58:14 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-04-29 12:58:14 DEBUG Webdrivers Checking current version
2019-04-29 12:58:14 DEBUG Webdrivers File is already downloaded: true
2019-04-29 12:58:14 DEBUG Webdrivers Current /Users/edgar/.webdrivers/chromedriver version: ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29})

2019-04-29 12:58:14 DEBUG Webdrivers Expected webdriver version found

Loading incorrect chromedriver version

I am using Sinatra and Minitest, and I'm trying to add tests to some pages which require javascript so I'm using capybara with selenium to accomplish that.

~/.webdrivers$ ./chromedriver -v
ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72)

$ chromium-browser --version
Chromium 73.0.3683.86 Built on Ubuntu , running on Ubuntu 16.04

Gemfile

group :test do
	gem 'minitest', :require => 'minitest/autorun'
	gem 'rack-test', :require => 'rack/test'
	gem 'capybara'
	gem 'capybara_minitest_spec'
	gem 'rack_session_access'
	gem 'capybara-selenium'
	gem 'webdrivers', '~> 3.0'
end

test_helper.rb

require 'webdrivers'
...
Selenium::WebDriver::Chrome.path = '/usr/bin/chromium-browser'

Capybara.register_driver :chrome_headless do |app|
  options = Selenium::WebDriver::Chrome::Options.new
  options.add_argument('--headless')
  options.add_argument('--no-sandbox')
  options.add_argument('--disable-dev-shm-usage')
  options.add_argument('--disable-gpu')
  options.add_argument('--window-size=1400,1400')
  Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
end

Capybara.javascript_driver = :chrome_headless

Here's the error (with debug info)

2019-04-17 16:48:44 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com                                                                                                       ] 41% Time: 00:00:08,  ETA: 00:00:12
2019-04-17 16:48:44 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-17 16:48:44 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-04-17 16:48:44 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com
2019-04-17 16:48:44 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-17 16:48:44 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-04-17 16:48:44 DEBUG Webdrivers Browser executable: '/usr/bin/chromium-browser'
2019-04-17 16:48:44 DEBUG Webdrivers Browser executable: '/usr/bin/chromium-browser'
2019-04-17 16:48:44 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-17 16:48:44 DEBUG Webdrivers Latest version available: 73.0.3683.68
2019-04-17 16:48:44 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com
2019-04-17 16:48:44 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-17 16:48:44 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-04-17 16:48:44 DEBUG Webdrivers Browser executable: '/usr/bin/chromium-browser'
2019-04-17 16:48:44 DEBUG Webdrivers Browser executable: '/usr/bin/chromium-browser'
2019-04-17 16:48:45 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-17 16:48:45 DEBUG Webdrivers Latest version available: 73.0.3683.68
2019-04-17 16:48:45 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com
2019-04-17 16:48:45 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-17 16:48:45 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-04-17 16:48:45 DEBUG Webdrivers Browser executable: '/usr/bin/chromium-browser'
2019-04-17 16:48:45 DEBUG Webdrivers Browser executable: '/usr/bin/chromium-browser'
2019-04-17 16:48:45 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-17 16:48:45 DEBUG Webdrivers Latest version available: 73.0.3683.68
2019-04-17 16:48:45 DEBUG Webdrivers Checking current version
2019-04-17 16:48:45 DEBUG Webdrivers File is already downloaded: true
2019-04-17 16:48:45 DEBUG Webdrivers Current /home/user/.webdrivers/chromedriver version: ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72)

2019-04-17 16:48:45 DEBUG Webdrivers Expected webdriver version found

Selenium::WebDriver::Error::SessionNotCreatedError:         Selenium::WebDriver::Error::SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 74
          (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 4.4.0-43-Microsoft x86_64)

Why is selenium trying to use version 74 when chromium and the correct webdriver are version 73?

MSWebdriver ignores currently installed version of Edge and fetches the latest available binary.

I am already working on a PR to fix this, but submitting this here in case anyone runs into this issue.

Microsoft recently released a new webdriver version 6.17134 for Edge 17.17134. If you are using this gem to launch an older version, say 16.16299, Selenium will fail to launch the browser with this error:

#<Errno::ECONNREFUSED: Failed to open TCP connection to localhost:17556 (No connection could be made because the target machine actively refused it. - connect(2) for "localhost" port 17556)>

This is because v3.3.0 of this gem is downloading the latest version and ignoring the installed version of Edge. The fix is to download the webdriver version that matches the installed version of Edge. I'll submit a PR to fix this.

Workaround: Download the binary manually and or upgrade your Edge version.

[3.7.0] Crashes with Jruby Windows

Expected Behavior:

chrome_on_windows returns the version number. When the environment is Windows and language is Jruby

Actual Behavior:

An error is thrown and program halts as the command is not translated properly when sent to powershell.

20:10:35.983 Get-ItemProperty : Cannot find path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App' because it does not exist. 20:10:35.983 At line:1 char:12 20:10:35.983 + (Get-Item (Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App ... 20:10:35.983 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 20:10:35.983 + CategoryInfo : ObjectNotFound: (HKLM:\SOFTWARE\...rentVersion\App:String) [Get-ItemProperty], ItemNotFo 20:10:35.983 undException 20:10:35.983 + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand 20:10:35.983 20:10:36.149 Default : The term 'Default' is not recognized as the name of a cmdlet, function, script file, or operable program. 20:10:36.149 Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 20:10:36.149 At line:1 char:100 20:10:36.149 + ... s\chrome.exe).(Default)).VersionInfo.ProductVersion 20:10:36.149 + ~~~~~~~ 20:10:36.149 + CategoryInfo : ObjectNotFound: (Default:String) [], CommandNotFoundException 20:10:36.149 + FullyQualifiedErrorId : CommandNotFoundException

Steps to Reproduce

  1. Copy the contents of the chrome_on_windows method to a new .rb file.
    reg = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe'
    ps = "(Get-Item (Get-ItemProperty '#{reg}').'(Default)').VersionInfo.ProductVersion"
    puts `powershell #{ps}`
  2. Execute the file using Jruby on a 64bit Windows OS (Confirmed with Windows 10, JDK 1.8, and Jruby 9.2.4) Also confirmed with (Windows Server 2012, JDK 1.8, Jruby 9.2)
  3. View the error above if reproduced successfully. Otherwise the chrome version is printed in the console as intended.

Potential Work-around

The following code executes the intended operation through Jruby Windows. This requires using the exec() command, escaping the space in App Paths with a ` character, and double escaping the single quotes.

This solution is not yet verified in vanilla Ruby
exec("powershell (Get-Item -Path ((Get-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\App` Paths\\chrome.exe\").\\'(default)\\')).VersionInfo.ProductVersion")

Note

I believe this issue stems from a long living Jruby Windows issue jruby/jruby#3725

Don't redefine methods

bundler/gems/webdrivers-ec5a9d9d5e03/lib/webdrivers/selenium.rb:6: warning: method redefined; discarding old driver_path
gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/chrome.rb:34: warning: previous definition of driver_path was here
bundler/gems/webdrivers-ec5a9d9d5e03/lib/webdrivers/selenium.rb:12: warning: method redefined; discarding old driver_path
gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/firefox.rb:51: warning: previous definition of driver_path was here
bundler/gems/webdrivers-ec5a9d9d5e03/lib/webdrivers/selenium.rb:18: warning: method redefined; discarding old driver_path
gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/edge.rb:33: warning: previous definition of driver_path was here
bundler/gems/webdrivers-ec5a9d9d5e03/lib/webdrivers/selenium.rb:24: warning: method redefined; discarding old driver_path
gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/ie.rb:30: warning: previous definition of driver_path was here

Does this gem monkey patch selenium?

Is there a better way to do it?

If not, then can use undef driver_path first.

log version of chromedriver being used?

I believe that without updating my version of webdrivers in Gemfile.lock, I can still get a different version of (eg) chromedriver on machine-to-machine or run-to-run? Because it will download the most recent if not cached?

I am getting a travis CI failure, perhaps due to changed chromedriver. It's a frustrating one to debug because I'm not getting it locally.

  1. Should webdrivers automatically print out the version of a driver it's using? That would make it easier for me to compare the chromedriver version from a lot of an old travis run that worked, to a log of the more recent one that did not. To see if that is the difference that's giving me a failure. As it is, the version of chromedriver being used in my historical succesful tests seems lost to history.
  • If there's a way for me to manually get this to happen, I could add it to my code now (and will do so if I can figure out how), but of course it's too late to add it to historical runs. I wonder if it should be output by default because by the time you know you need it...
  1. On local workstation where my tests are green... is it possible webdrivers is using a cached copy, instead of the same copy it's downloading fresh on travis? If so... how do I uncache it, to make it more like travis? It's possible this is in the README, but i was having trouble finding it. Or I may be misunderstanding what's going on.

Unable to find chromedriver

I'm using Capybara and Selenium for testing; however, my specs are failing with the following error:

Selenium::WebDriver::Error::WebDriverError:
             Unable to find chromedriver. Please download the server from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH. More info at https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver.

Here is my configuration:

/Gemfile

...
gem 'webdrivers', '~> 3.0'
...

/spec/spec_helper.rb

...
require 'webdrivers' 
require 'selenium-webdriver'

Capybara.register_driver :chrome_headless do |app|
  options = Selenium::WebDriver::Chrome::Options.new
  options.add_argument('--headless')
  options.add_argument('--no-sandbox')
  options.add_argument('--disable-dev-shm-usage')
  options.add_argument('--disable-gpu')
  options.add_argument('--window-size=1400,1400')
  Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
end

Capybara.javascript_driver = :chrome_headless
Capybara.default_host = Domain.manager_domain

Capybara.configure do |config|
  config.default_max_wait_time = 15 # seconds
end
...

I've noticed that ~/.webdrivers does not exist, I'm assuming that's an issue. I'm not sure when the drivers are supposed to download/install, but it appears as though they're haven't.

[3.7.1] Won't set Chromium 'release_version' on Linux

Hi,

I'm getting this error when running specs with Capybara:

NoMethodError:
            undefined method `<' for nil:NilClass

# /home/user/.rvm/gems/ruby-2.5.3@gemset/gems/webdrivers-3.7.1/lib/webdrivers/chromedriver.rb:22:in `latest_version'
# /home/user/.rvm/gems/ruby-2.5.3@gemset/gems/webdrivers-3.7.1/lib/webdrivers/common.rb:37:in `desired_version'
# /home/user/.rvm/gems/ruby-2.5.3@gemset/gems/webdrivers-3.7.1/lib/webdrivers/common.rb:16:in `update'
# /home/user/.rvm/gems/ruby-2.5.3@gemset/gems/webdrivers-3.7.1/lib/webdrivers/selenium.rb:7:in `driver_path'
# /home/userr/.rvm/gems/ruby-2.5.3@gemset/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/chrome/driver.rb:39:in `initialize'
# /home/userr/.rvm/gems/ruby-2.5.3@gemset/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/common/driver.rb:44:in `new'
# /home/userr/.rvm/gems/ruby-2.5.3@gemset/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/common/driver.rb:44:in `for'
# /home/user/.rvm/gems/ruby-2.5.3@gemset/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver.rb:86:in `for'
# /home/user/.rvm/gems/ruby-2.5.3@gemset/gems/capybara-2.18.0/lib/capybara/selenium/driver.rb:23:in `browser'
.
.
.

Debugging the file you can see the regexp in method chrome_version is not working propperly when the Chromium version has a dot before the actual version number:

[18, 27] in /home/user/.rvm/gems/ruby-2.5.3@gemset/gems/webdrivers-3.7.1/lib/webdrivers/chromedriver.rb
   18:       def latest_version
   19:         raise StandardError, 'Can not reach site' unless site_available?
   20: 
   21:         # Versions before 70 do not have a LATEST_RELEASE file
   22:         byebug
=> 23:         return Gem::Version.new('2.46') if release_version < '70.0.3538'
   24: 
   25:         # Latest webdriver release for installed Chrome version
   26:         release_file     = "LATEST_RELEASE_#{release_version}"
   27:         latest_available = get(URI.join(base_url, release_file))
(byebug) release_version
nil
(byebug) chrome_version[/\d+\.\d+\.\d+/]
nil
(byebug) chrome_on_linux
"Using PPAPI flash.\n73.0.3683.75"
(byebug) "Using PPAPI flash.\n73.0.3683.75"[/(\d|\.)+/]
"."
(byebug) "Using PPAPI flash\n73.0.3683.75"[/(\d|\.)+/]
"73.0.3683.75"

# Testing modified regexp
(byebug) "Using PPAPI flash.\n73.0.3683.75"[/\d(\d|\.)+/]
"73.0.3683.75"
(byebug) "Using PPAPI flash\n73.0.3683.75"[/\d(\d|\.)+/]
"73.0.3683.75"
(byebug) "Using PPAPI flash 73.0.3683.75"[/\d(\d|\.)+/]
"73.0.3683.75"

I'm runnig Linux Mint 19.1 with Chromium Version 73.0.3683.75 (Official Build) Built on Ubuntu.

Thanks

DevToolsActivePort file doesn't exist

I am not sure if this directly an issue with chromedriver or selenium or anything else. I am currently running my program in docker (which uses Debian 9.5) with ruby:2.5.1. I am able to install chrome directly and can confirm the download with google-chrome --version which yields 73.0.3683.103.

I have confirmed that the path is /usr/bin/google-chrome and have set it directly with Selenium::WebDriver::Chrome.path = '/usr/bin/google-chrome' to ensure it is locating Chrome correctly.

This is the error I am getting

Selenium::WebDriver::Error::UnknownError:
       unknown error: Chrome failed to start: exited abnormally
         (unknown error: DevToolsActivePort file doesn't exist)
         (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
         (Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Linux 4.9.125-linuxkit x86_64)
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/response.rb:32:in `initialize'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/http/common.rb:84:in `new'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/http/common.rb:84:in `create_response'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/http/default.rb:104:in `request'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/http/common.rb:62:in `call'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/bridge.rb:166:in `execute'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/bridge.rb:99:in `create_session'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/bridge.rb:53:in `handshake'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/chrome/driver.rb:49:in `initialize'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/common/driver.rb:44:in `new'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/common/driver.rb:44:in `for'
     # /usr/local/bundle/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver.rb:86:in `for'
     # /usr/local/bundle/gems/capybara-3.16.1/lib/capybara/selenium/driver.rb:37:in `browser'
     # /usr/local/bundle/gems/capybara-3.16.1/lib/capybara/selenium/driver.rb:56:in `visit'
     # /usr/local/bundle/gems/capybara-3.16.1/lib/capybara/session.rb:277:in `visit'
     # /usr/local/bundle/gems/capybara-3.16.1/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'```

Test on Ruby 2.5 and 2.6 as well

Currently the .travis.yml only tests on Ruby 2.4 and JRuby 9.2, it'd probably be good to run the test suite on Ruby 2.5 and 2.6 as well :)

webdrivers/.travis.yml

Lines 1 to 14 in 024b60a

sudo: required
os:
- linux
- osx
language: ruby
cache: bundler
rvm:
- 2.4.1
- jruby-9.2.0.0
addons:
chrome: stable
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install chromium-browser libgconf-2-4 ; fi

latest "stable" release? Chromedriver 73 vs 74

webdrivers README says:

If you would like to use a specific (older or beta) version, you can specify it for each driver. Otherwise, the latest (stable) driver will be downloaded and passed to Selenium.

The Chromedriver home page currently says:

Latest stable release: ChromeDriver 73.0.3683.68
Latest beta release: ChromeDriver 74.0.3729.6

I can't explain how ChromeDriver versioning works, but for whatever reason they are suggesting 74.0 is "beta", and 73.0 is "latest stable".

However, in the error message I have for a failing capybara test on travis, it's telling me:

Driver info: chromedriver=74.0.3729.6

Could webdrivers be downloading 74 instead of 73? Ought it to be downloading 73 instead?

If I hadn't had that version printed out in an error... I'm not sure how to tell what version of chromedriver is being used, after being pulled by webdrivers.

Cannot reach site for GheckoDriver

Hello,

Using the gem I am able to get chromedriver working. chrome.current, chrome.latest etc all return expected results. Using ff = Webdrivers::Geckodriver, ff.current == nil, ff.latest == Can not reach site.

Is there more documentation out there for installing and updating the drivers? I am missing something?

Add Rubocop

I hate it when I have to look back at ugly code that previous-me wrote. Rubocop will at least make it consistent.

Dealing with Webmock

I'm using webmock in my tests and I can't figure out a good way to deal with it blocking webdrivers' requests. I've tried not requiring webmock in the gem file, and explicitly requiring it after webdrivers in test_helper.rb and it still blocks the request... do you have a good method for avoiding this problem?

Where do you normally require 'webdrivers' ? Do you use webmock? Is there a command I can call to make it download the drivers immediately so it doesn't get caught after webmock is initialized?

Migrating from chromedriver-helper (Heroku production)

I use Watir and chromedriver-helper for parallel chrome headless execution on Heroku.

This configuration has worked well for chromedriver-helper. Just tried migrating to webdrivers and now when I call

browser = Watir::Browser.new :chrome, options: options

The app hangs with this message

DevTools listening on ws://127.0.0.1:9222/devtools/browser/ec46578f-304d-4a11-8441-fee4092aebac

Does anyone have a similar setup or advice on how I can get webdrivers and watir to work together on Heroku?

class Browser::Builder
  attr_reader :downloads

  def self.call(downloads: false)
    new(downloads: downloads).call
  end

  def initialize(downloads: false)
    @downloads = downloads
  end

  def key
    @key ||= object_id
  end

  def number
    @number ||= rand(1..20_000)
  end

  def call
    options = Selenium::WebDriver::Chrome::Options.new

    # make a directory for chrome if it doesn't already exist
    chrome_dir = File.join Dir.pwd, ["tmp", "chrome#{key}"]
    FileUtils.mkdir_p chrome_dir
    user_data_dir = "--user-data-dir=#{chrome_dir}"
    # add the option for user-data-dir
    options.add_argument user_data_dir

    # let Selenium know where to look for chrome if we have a hint from
    # heroku. chromedriver-helper & chrome seem to work out of the box on osx,
    # but not on heroku.
    if chrome_bin = ENV["GOOGLE_CHROME_SHIM"]
      options.add_argument "--no-sandbox"
      options.binary = chrome_bin
    end

    # headless!
    options.add_argument "--window-size=2048x1080"
    options.add_argument "--headless"
    options.add_argument "--disable-gpu"
    options.add_argument "--disable-dev-shm-usage"
    options.add_argument "--port=#{9514 + number}"

    # make the browser
    browser = Watir::Browser.new :chrome, options: options

    # setup downloading options
    if downloads
      # make download storage directory
      downloads_dir = File.join Dir.pwd, ["tmp", "downloads#{key}"]
      FileUtils.mkdir_p downloads_dir

      # tell the bridge to use downloads
      bridge = browser.driver.send :bridge
      path = "/session/#{bridge.session_id}/chromium/send_command"
      params = { behavior: "allow", downloadPath: downloads_dir }
      bridge.http.call(:post, path, cmd: "Page.setDownloadBehavior",
                                    params: params)
    end
    browser
  end
end

Browser binary path is not shell escaped when custom Chrome.path is used

There is a google chrome app at custom location.

chrome_path = '/Users/CI/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
Selenium::WebDriver::Chrome.path = chrome_path

⬇️

DEBUG Webdrivers Browser executable: '/Users/CI/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
rails_test: No such file or directory - /Users/CI/Applications/Google

If I do shell escaping:

chrome_path = '/Users/CI/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
Selenium::WebDriver::Chrome.path = Shellwords.escape(chrome_path)

⬇️ This time selenium-webdriver gives an error:

selenium-webdriver-3.141.0/lib/selenium/webdriver/common/platform.rb:128:
in `assert_file': not a file: "/Users/CI/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome" (Selenium::WebDriver::Error::WebDriverError)

`block in newest_version': undefined method `[]' for nil:NilClass (NoMethodError)

Summary

I have failing cucumber tests locally and in Codeship build after migrating from the chromedriver-helper gem to the webdrivers gem. The error is unable to connect to chromedriver 127.0.0.1:9515 (Selenium::WebDriver::Error::WebDriverError)

The 'newest_version` in the title refers to the method in the webdrivers/chromedriver.rb

  def newest_version
        padded = downloads.keys.each_with_object({}) do |version, hash|
          matched = version.match(/^(\d+)\.(\d+)$/)
          minor = sprintf '%02d', matched[2]
          hash["#{matched[1]}.#{minor}"] = version
        end
        padded.keys.sort.last
   end

I have gems to update due to security vulnerabilities and your help much appreciated.

Info

Outside the project directory running chromedriver --version

Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}) on port 9515

In the project directory that I need to update running chromedriver --version traceback

Traceback (most recent call last):
        8: from /Users/louiserobinson-blue/.rbenv/versions/2.5.3/bin/chromedriver:23:in `<main>'
        7: from /Users/louiserobinson-blue/.rbenv/versions/2.5.3/bin/chromedriver:23:in `load'
        6: from /Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/webdrivers-2.4.0/bin/chromedriver:5:in `<top (required)>'
        5: from /Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/webdrivers-2.4.0/lib/webdrivers/common.rb:9:in `install'
        4: from /Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/webdrivers-2.4.0/lib/webdrivers/common.rb:16:in `download'
        3: from /Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/webdrivers-2.4.0/lib/webdrivers/chromedriver.rb:17:in `newest_version'
        2: from /Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/webdrivers-2.4.0/lib/webdrivers/chromedriver.rb:17:in `each_with_object'
        1: from /Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/webdrivers-2.4.0/lib/webdrivers/chromedriver.rb:17:in `each'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/webdrivers-2.4.0/lib/webdrivers/chromedriver.rb:19:in `block in newest_version': undefined method `[]' for nil:NilClass (NoMethodError)
  • Operating system
    Mac IOS

Actual Behavior with logger and running bundle exec cucumber

undefined method `logger' for Webdrivers:Module (NoMethodError)
/Users/louiserobinson-blue/Documents/workplace/nznavigator/features/support/capybara.rb:3:in `<top (required)>'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:268:in `load'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:268:in `block in load'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:240:in `load_dependency'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:268:in `load'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/cucumber-3.1.0/lib/cucumber/glue/registry_and_more.rb:106:in `load_code_file'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/cucumber-3.1.0/lib/cucumber/runtime/support_code.rb:147:in `load_file'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/cucumber-3.1.0/lib/cucumber/runtime/support_code.rb:88:in `block in load_files!'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/cucumber-3.1.0/lib/cucumber/runtime/support_code.rb:87:in `each'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/cucumber-3.1.0/lib/cucumber/runtime/support_code.rb:87:in `load_files!'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/cucumber-3.1.0/lib/cucumber/runtime.rb:270:in `load_step_definitions'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/cucumber-3.1.0/lib/cucumber/runtime.rb:67:in `run!'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/cucumber-3.1.0/lib/cucumber/cli/main.rb:33:in `execute!'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/cucumber-3.1.0/bin/cucumber:9:in `<top (required)>'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/bin/cucumber:23:in `load'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/bin/cucumber:23:in `<top (required)>'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `load'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:28:in `run'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/cli.rb:463:in `exec'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/cli.rb:27:in `dispatch'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/cli.rb:18:in `start'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/exe/bundle:30:in `block in <top (required)>'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/exe/bundle:22:in `<top (required)>'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/bin/bundle:23:in `load'
/Users/louiserobinson-blue/.rbenv/versions/2.5.3/bin/bundle:23:in `<main>'

I have the logger in the capybara.rb

require "selenium/webdriver"
require "webdrivers"
Webdrivers.logger.level = :DEBUG

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

Capybara.register_driver :headless_chrome do |app|
  capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
    chromeOptions: { args: %w[headless disable-gpu] }
  )

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

Capybara.javascript_driver = :headless_chrome

Improve error message when Driver for Chrome Dev (v75.x.x) is not found

Hey! Just migrated from chrome-driver to webdrivers.
I have installed Chrome Dev Channel (75.0.3770.8 dev) in my Mac. This was the output when I ran tests without any additional configuration. It would be cool if this message could be improved when the webdriver version couldn't be found and it is falling back to the installed chrome app. The tests didn't work when this happened.

➜ bin/rails test:system
Run options: --seed 21855

# Running:

Capybara starting Puma...
* Version 3.12.1 , codename: Llamas in Pajamas
* Min threads: 0, max threads: 4
* Listening on tcp://127.0.0.1:50633
2019-04-29 12:35:57 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com
2019-04-29 12:35:57 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-29 12:35:57 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-04-29 12:35:57 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com
2019-04-29 12:35:58 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-29 12:35:58 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-04-29 12:35:58 DEBUG Webdrivers Browser executable: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
2019-04-29 12:35:58 DEBUG Webdrivers Browser executable: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
2019-04-29 12:35:59 DEBUG Webdrivers Get response: #<Net::HTTPNotFound 404 Not Found readbody=true>
2019-04-29 12:35:59 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com
2019-04-29 12:35:59 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-29 12:35:59 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-04-29 12:35:59 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com
2019-04-29 12:36:00 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2019-04-29 12:36:00 DEBUG Webdrivers Found Site: https://chromedriver.storage.googleapis.com
2019-04-29 12:36:00 DEBUG Webdrivers Browser executable: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
2019-04-29 12:36:00 DEBUG Webdrivers Browser executable: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
2019-04-29 12:36:00 DEBUG Webdrivers Get response: #<Net::HTTPNotFound 404 Not Found readbody=true>
E

Error:
DeviceQueryTest#test_query_devices_by_id:
Net::HTTPServerException: 404 "Not Found"
    test/system/device_queries_test.rb:12:in `block in <class:DeviceQueryTest>'

Once I specified the version everything worked well.

Webdrivers::Chromedriver.version = '74.0.3729.6'

msedgedriver support

Need to figure out the right way to support the new chromium backed for Edge. Not sure if this will require selenium 4, or if we can release it as party of webdrivers 4.0

Feature: Allow user to define a target_version which overrides the latest version.

Current implementation fetches the latest webdriver binary if current does not match latest. The user may not want this to happen if they're executing their tests against a specific (older) version or versions of the browser.

My use case: I am working on debugging an issue which requires me to test prior versions of selenium-webdriver and corresponding binaries for IE. To make this work, I have to remove webdrivers gem and manually place the binary for each version in PATH and test my code.

Through this feature, the user will be able to provide a target_version (open to a better name) which overrides latest and downloads the user given version of the binary.

Example

require 'watir'
require 'webdrivers'

Webdrivers::IEdriver.target_version = 3.14.0.0

b = Watir::Browser.new :ie

Webdrivers.IEdriver.current = #<Gem::Version "3.14.0.0"> # matches target_version
Webdrivers.IEdriver.latest = #<Gem::Version "3.141.0.0"> # latest version, newer than target_version

I'm interested in submitting a PR for this. Just want to see if anyone has an opinions or recommendations.

Undefined Method '[]' for nil:NilClass

I got this following error below when trying to use chromedriver in parallel, could you please help me what happened and how to fix it?
All supported really appreciated much.

#<NoMethodError: undefined method `[]' for nil:NilClass>
  /Users/lutvirosyady/.rvm/gems/ruby-2.5.0/gems/webdrivers-3.4.0/lib/webdrivers/chromedriver.rb:12:in `current'
  /Users/lutvirosyady/.rvm/gems/ruby-2.5.0/gems/webdrivers-3.4.0/lib/webdrivers/common.rb:190:in `correct_binary?'
  /Users/lutvirosyady/.rvm/gems/ruby-2.5.0/gems/webdrivers-3.4.0/lib/webdrivers/common.rb:22:in `update'
  /Users/lutvirosyady/.rvm/gems/ruby-2.5.0/gems/webdrivers-3.4.0/lib/webdrivers/selenium.rb:7:in `driver_path'
  /Users/lutvirosyady/.rvm/gems/ruby-2.5.0/gems/selenium-webdriver-3.14.0/lib/selenium/webdriver/chrome/driver.rb:38:in `initialize'
  /Users/lutvirosyady/.rvm/gems/ruby-2.5.0/gems/selenium-webdriver-3.14.0/lib/selenium/webdriver/common/driver.rb:44:in `new'
  /Users/lutvirosyady/.rvm/gems/ruby-2.5.0/gems/selenium-webdriver-3.14.0/lib/selenium/webdriver/common/driver.rb:44:in `for'
  /Users/lutvirosyady/.rvm/gems/ruby-2.5.0/gems/selenium-webdriver-3.14.0/lib/selenium/webdriver.rb:86:in `for'

Documentation: Update typo in wiki for VCR configuration

I am unable to update the wiki so please find description of change request in this issue.

Issue: The ignore_hosts call for VCR configuration is a method that takes an array and not an assignment.

The error is on this wiki section: https://github.com/titusfortner/webdrivers/wiki/Using-with-VCR-or-WebMock#vcr

It should be

VCR.configure do |config|
  config.ignore_hosts([
    "chromedriver.storage.googleapis.com",
    "github.com/mozilla/geckodriver/releases",
    "selenium-release.storage.googleapis.com",
    "developer.microsoft.com/en-us/microsoft-edge/tools/webdriver"
  ])
end

See here for example usage: https://github.com/vcr/vcr/blob/806dcebfd87123b45cb57c2152be568030864c4b/spec/support/shared_example_groups/hook_into_http_library.rb#L553

Public Methods

Let's make sure that browser versions and driver versions are properly and usefully publicly accessible

parallelization issues

Hello,

Wedrivers is having some problems with parallelization. This makes it unusable on Heroku CI and under Rails 6.
One of the threads downloads the driver while the others try to access the resource. Which leads to this error.

Error:
AuthenticationsTest#test_successful_login:
Zip::Error: File /home/circleci/.webdrivers/chromedriver_linux64.zip has zero size. Did you mean to pass the create flag?
    test/system/authentications_test.rb:7:in `block in <class:AuthenticationsTest>'


rails test test/system/authentications_test.rb:6
Error:
AuthenticationsTest#test_failed_login:
ChildProcess::LaunchError: Text file busy - /home/circleci/.webdrivers/chromedriver
    test/system/authentications_test.rb:14:in `block in <class:AuthenticationsTest>'


rails test test/system/authentications_test.rb:13

Traceback (most recent call last):
	13: from /home/circleci/doctopod/vendor/bundle/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'
	12: from /home/circleci/doctopod/vendor/bundle/gems/minitest-5.11.3/lib/minitest.rb:133:in `run'
	11: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:70:in `start'
	10: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:70:in `map'
	 9: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:70:in `each'
	 8: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:70:in `times'
	 7: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:71:in `block in start'
	 6: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:71:in `fork'
	 5: from /home/circleci/doctopod/vendor/bundle/gems/selenium-webdriver-3.142.0/lib/selenium/webdriver/common/platform.rb:150:in `block in exit_hook'
	 4: from /home/circleci/doctopod/vendor/bundle/gems/selenium-webdriver-3.142.0/lib/selenium/webdriver/common/service.rb:105:in `stop'
	 3: from /home/circleci/doctopod/vendor/bundle/gems/selenium-webdriver-3.142.0/lib/selenium/webdriver/common/service.rb:170:in `stop_server'
	 2: from /home/circleci/doctopod/vendor/bundle/gems/selenium-webdriver-3.142.0/lib/selenium/webdriver/common/service.rb:180:in `process_exited?'
	 1: from /home/circleci/doctopod/vendor/bundle/gems/childprocess-1.0.1/lib/childprocess/unix/process.rb:31:in `exited?'
/home/circleci/doctopod/vendor/bundle/gems/childprocess-1.0.1/lib/childprocess/abstract_process.rb:188:in `assert_started': process not started (ChildProcess::Error)
	14: from /home/circleci/doctopod/vendor/bundle/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'
	13: from /home/circleci/doctopod/vendor/bundle/gems/minitest-5.11.3/lib/minitest.rb:133:in `run'
	12: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:70:in `start'
	11: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:70:in `map'
	10: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:70:in `each'
	 9: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:70:in `times'
	 8: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:71:in `block in start'
	 7: from /home/circleci/doctopod/vendor/bundle/gems/activesupport-6.0.0.rc1/lib/active_support/testing/parallelization.rb:71:in `fork'
	 6: from /home/circleci/doctopod/vendor/bundle/gems/selenium-webdriver-3.142.0/lib/selenium/webdriver/common/platform.rb:150:in `block in exit_hook'
	 5: from /home/circleci/doctopod/vendor/bundle/gems/selenium-webdriver-3.142.0/lib/selenium/webdriver/common/service.rb:110:in `stop'
	 4: from /home/circleci/doctopod/vendor/bundle/gems/selenium-webdriver-3.142.0/lib/selenium/webdriver/common/service.rb:110:in `ensure in stop'
	 3: from /home/circleci/doctopod/vendor/bundle/gems/selenium-webdriver-3.142.0/lib/selenium/webdriver/common/service.rb:163:in `stop_process'
	 2: from /home/circleci/doctopod/vendor/bundle/gems/selenium-webdriver-3.142.0/lib/selenium/webdriver/common/service.rb:180:in `process_exited?'
	 1: from /home/circleci/doctopod/vendor/bundle/gems/childprocess-1.0.1/lib/childprocess/unix/process.rb:31:in `exited?'
/home/circleci/doctopod/vendor/bundle/gems/childprocess-1.0.1/lib/childprocess/abstract_process.rb:188:in `assert_started': process not started (ChildProcess::Error)

These are logs under Rails 6 and Circle CI. But I get the same result on Rails 5.2.3 with Heroku CI.

If you have any idea how we can handle this, I'm ready to work on it.

Thanks! Keep up the good work!

Could not decompress chromedriver_linux64.zip

   RuntimeError:
        Could not decompress chromedriver_linux64.zip to get /home/me/.webdrivers/chromedriver
      # /home/me/.rvm/gems/ruby-2.4.1/gems/webdrivers-3.3.1/lib/webdrivers/common.rb:63:in `download'

During the middle of the day today, all of my selenium driven tests using chromedriver started failing with the above error.

I'm really not sure how to figure out whether this error is at the webdrivers level or, the chromedriver-helper level, or at their interface but it seems like the webdrivers gem is unable to unzip some file that it expects the chromedriver-helper to have placed at ~/.chromedriver-helper/70.0.3538.16/linux64.

Please let me know if there is any more info I can provide that would be helpful as I know this is a bit vague.

invalid chromedriver for alpine

On Alpine linux webdrivers gem downloads invalid binary. This binary has strange error when executing:

@0fb37473e04b:~/.webdrivers$ ./chromedriver --help
/bin/ash: ./chromedriver: not found

From within irb:

irb(main):034:0> File.exists?('/root/.webdrivers/chromedriver')
=> true
irb(main):035:0> Webdrivers::Chromedriver.current_version      
2019-04-29 11:25:40 DEBUG Webdrivers Checking current version
2019-04-29 11:25:40 DEBUG Webdrivers File is already downloaded: true
/usr/local/bundle/bin/bundle: No such file or directory - /root/.webdrivers/chromedriver
2019-04-29 11:25:40 DEBUG Webdrivers Current /root/.webdrivers/chromedriver version: 
Traceback (most recent call last):
       15: from /usr/local/bundle/bin/bundle:23:in `<main>'
       14: from /usr/local/bundle/bin/bundle:23:in `load'
       13: from /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>'
       12: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
       11: from /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>'
       10: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:18:in `start'
        9: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
        8: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:27:in `dispatch'
        7: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
        6: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
        5: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        4: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:494:in `console'
        3: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/cli/console.rb:19:in `run'
        2: from (irb):35
        1: from /usr/local/bundle/gems/webdrivers-3.8.0/lib/webdrivers/chromedriver.rb:15:in `current_version'

Reason(ldd output):

@0fb37473e04b:~/.webdrivers$ ldd ./chromedriver
        /lib64/ld-linux-x86-64.so.2 (0x7fa23b37c000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7fa23b37c000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fa23b37c000)
        librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7fa23b37c000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x7fa23a818000)
        libnss3.so => /usr/lib/libnss3.so (0x7fa23a6ea000)
        libnssutil3.so => /usr/lib/libnssutil3.so (0x7fa23a6b8000)
        libnspr4.so => /usr/lib/libnspr4.so (0x7fa23a676000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x7fa23a553000)
        libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fa23b37c000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fa23a53f000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fa23b37c000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by ./chromedriver)
        libpcre.so.1 => /usr/lib/libpcre.so.1 (0x7fa23a4e2000)
        libintl.so.8 => /usr/lib/libintl.so.8 (0x7fa23a4d2000)
        libplc4.so => /usr/lib/libplc4.so (0x7fa23a4cb000)
        libplds4.so => /usr/lib/libplds4.so (0x7fa23a4c6000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x7fa23a49f000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x7fa23a49a000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x7fa23a492000)
        libbsd.so.0 => /usr/lib/libbsd.so.0 (0x7fa23a47e000)

chromium-chromedriver downloaded through apline package manger works well.

Checking latest Chromedriver version via LATEST_RELEASE is deprecated

From flavorjones/chromedriver-helper#79, using Chromedriver's LATEST_RELEASE page for the latest version is deprecated.

We currently get 2.46, even though the latest is now 73.0.3683.68. Both support Chrome v73, so not a big deal. However, when Chrome v74 is released, we will presumably run into version mismatch errors (ie we'd still be downloading 2.46).

We need to update the process as documented in http://chromedriver.chromium.org/downloads/version-selection.

GeckoDriver "Not in GZip Format"

I get this error every time when it's attempting to use the file geckodriver-v0.19.1-macos.tar.gz:

`initialize': not in gzip format (Zlib::GzipFile::Error)

I have confirmed that the above file is downloaded and placed in the ./webdrivers directory. This is just using the gem "out of the box", no special setup or weird configurations.

The error is happening on this line:

https://github.com/titusfortner/webdrivers/blob/master/lib/webdrivers/common.rb#L141

Update:

I've confirmed that what gets downloaded is 0 bytes. So this may be related to this issue: #3. However, when I change my local copy to use that code, the issue still appears because it's occurring on that first line, so it never gets to the subsequent lines that are presumably providing the fix.

This file (geckodriver-v0.19.1-macos.tar.gz) is apparently being downloaded as a zero byte file in the first place.

NoMethodError in Chrome (undefined method `strip' for nil:NilClass)

System

Ubuntu 18.04
Ruby 2.5.1p57 (freshly installed)
NOTE: I also tried this on Ruby 2.6.2 and 2.5.5
Chromium version: Version 73.0.3683.75 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit)

Steps Followed

Created a brand new rails app with default settings.
Here is my Gemfile:
Gemfile.txt

Chrome Browser (Fails)

Running via Spring preloader in process 29442
Loading development environment (Rails 5.2.3)
irb(main):001:0> Watir::Browser.new(:chrome)
rails_console: No such file or directory - --product-version
Traceback (most recent call last):
        2: from (irb):1
        1: from (irb):1:in `new'
NoMethodError (undefined method `strip' for nil:NilClass)

Firefox Browser (Works OK)

irb(main):003:0> b = Watir::Browser.new(:firefox)
=> #<Watir::Browser:0x3a74db97bfeb780e url="about:blank" title="">
irb(main):005:0> b.goto('www.google.com')
=> "http://www.google.com"
irb(main):006:0>

Current Solution: Go back to chromedriver-helper for Chrome

If I include gem 'chromedriver-helper' in my Gemfile, run bundle install and jump back into the Rails console, then Chrome works too.

Running via Spring preloader in process 29466
Loading development environment (Rails 5.2.3)
irb(main):001:0> b = Watir::Browser.new(:chrome)
=> #<Watir::Browser:0x..f9dd5c620c38cd000 url="data:," title="">
irb(main):002:0> b.goto('www.google.com')
=> "http://www.google.com"

Firefox is fine either way.

Cache Binaries

Ideally each session shouldn't need to make a network call if the driver has been recently updated. Alternately if there's a way to programmatically establish the correct driver for the browser version and not unnecessarily check for updates.

NoMethodError: undefined method `match' for nil:NilClass

[1] pry(main)> require 'webdrivers'
=> true
[2] pry(main)> Webdrivers::Chromedriver.current
rails_console: No such file or directory - /root/.webdrivers/chromedriver
NoMethodError: undefined method `match' for nil:NilClass
from /usr/local/bundle/gems/webdrivers-3.4.3/lib/webdrivers/chromedriver.rb:12:in `current'

Same error when running tests.
interestingly the directory '/root/.webdrivers/chromedriver' does exist.

ruby version : 2.5.3
os: alpine

Don't depend on net_http_ssl_fix

This should be optional, not required. I suggest adding a note in the README for users who want to use it. Otherwise, I see this as a major security risk.

Uncompressed geckodriver binary is 0 bytes

This manifests as a permission denied error:

  Errno::EACCES:
            Permission denied - /home/ubuntu/.webdrivers/geckodriver

I see that the file is zero bytes:

$ ls -l ~/.webdrivers/
total 2696
-rw-r--r--  1 shep  staff        0 Sep 13 16:36 geckodriver
-rw-r--r--  1 shep  staff  1378434 Sep 13 16:36 geckodriver-v0.18.0-macos.tar.gz

The MD5 of the downloaded file matches one I downloaded from GitHub by hand:

$ md5sum geckodriver-v0.18.0-macos.tar.gz /tmp/geckodriver-v0.18.0-macos.tar.gz
79cf3050cc942cdff6edbc7605d05ef2  geckodriver-v0.18.0-macos.tar.gz
79cf3050cc942cdff6edbc7605d05ef2  /tmp/geckodriver-v0.18.0-macos.tar.gz

And if I decompress it by hand, that also works:

$ tar -zxvf geckodriver-v0.18.0-macos.tar.gz
$ ls -lrt
total 10064
-rwxr-xr-x  1 shep  staff  3769184 Jul 11 08:49 geckodriver
-rw-r--r--  1 shep  staff  1378434 Sep 13 16:36 geckodriver-v0.18.0-macos.tar.gz

I am using webdrivers 3.2.1 with Ruby 2.3.3p222.

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.