You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Ruby 3.0.1, when the stdlib uri package has not already been required, selenium-webdriver v4.0.0.rc1 throws this error when creating a browser driver:
Executable steps are below, but this is the plain-language general idea:
Create and navigate to a project directory
Initialize a Gemfile
Add a local Bundler configuration
Install gems
Create a Ruby script requiring selenium-webdriver and initializing a browser driver
Run the script with bundle exec
Expected behavior
Firefox window appears briefly and then disappears
Program runs without errors
Test script or set of commands reproducing this issue
Installing a geckodriver binary - skip if not needed
# Change this for your architecture - I'm on an M1 Mac (https://github.com/mozilla/geckodriver/releases)
geckodriver_url="https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-macos-aarch64.tar.gz"
geckodriver_path="$HOME/Downloads/geckodriver.tar.gz"# Change this to a directory where `geckodriver` will be available to your `PATH`
geckodriver_target="$HOME/scripts"
mkdir -p $geckodriver_target
curl -L $geckodriver_url -o $geckodriver_path
gzip -d $geckodriver_path --stdout | tar -xvf -C $geckodriver_targetunset geckodriver_url
unset geckodriver_path
🐛 Bug Report
On Ruby 3.0.1, when the stdlib
uri
package has not already been required,selenium-webdriver v4.0.0.rc1
throws this error when creating a browser driver:This can be fixed by including the line
require "uri"
at this line: https://github.com/SeleniumHQ/selenium/blob/trunk/rb/lib/selenium/webdriver.rb#L26, which I will open a PR for shortly.To Reproduce
Executable steps are below, but this is the plain-language general idea:
selenium-webdriver
and initializing a browser driverbundle exec
Expected behavior
Test script or set of commands reproducing this issue
Installing a
geckodriver
binary - skip if not neededReproduction script
Environment
OS: macOS 11.5.2
Browser: Firefox
Browser version: 92.0 build 20210903235534
Browser Driver version: geckodriver 0.29.1 (970ef713fe58 2021-04-08 23:34 +0200)
Language Bindings version: Ruby 3.0.1
The text was updated successfully, but these errors were encountered: