Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,168 @@
4.26.0 (2024-10-28)
=========================
* Add CDP for Chrome 130 and remove 127
* Add missing RBS methods (#14621)
* Update Ruby BiDi script structs to match spec
* Add RBS type support for BiDi related classes (#14611)

4.25.0 (2024-09-19)
=========================
* Add CDP for Chrome 129 and remove 126
* Fix add_cause method not being able to process an array of hashes (#14433)
* replace `fedcm` links with new ones (#14478)
* Allow driver path to be set using ENV variables (#14287)

4.24.0 (2024-08-23)
=========================
* Deprecate WebStorage JS methods (#14276)
* BUGFIX: Add stamp to nightly build (#14320)
* Add timeout and tests for curb, also added the gem curb that was not part of selenium (#14285)
* Add CDP for Chrome 128 and remove 125

4.23.0 (2024-07-18)
=========================
* Add FedCM support to the ruby selenium client (#13796)
* Add URLs constant to update error messages (#14174)
* Update selenium manager types (#14189)
* Add backtrace locations and cause to errors (#14170)
* Add CDP for Chrome 127 and remove 124

4.22.0 (2024-06-20)
=========================

* Force UTF-8 encoding on logger (see #6937)
* Don't crash when ChildProcess is already killed (see #14032)
* Manage bidi instance on the bridge not the driver (#14071)
* Implement High Level Logging API with BiDi (#14073)
* Fix bug with message deletion in Guard class
* Change output for Guard class
* Implement toggle for BiDi and Classic implementations (#14092)
* Add preference to enable CDP in Firefox by default (#14091)
* Add support for the w3c silent option for the ruby library (#14152)
* Add CDP for Chrome 126 and remove 123

4.21.1 (2024-05-16)
=========================

* Fixed missing Chrome binary error in Rails system tests.

4.21.0 (2024-05-16)
=========================

* Add CDP for Chrome 125 and remove 122
* Initial extensibility points for Appium
* Support registering extra headers in HTTP client
* Support overriding User-Agent in HTTP client
* Support registering extra bridge commands
* Support overriding default locator conversion
* Support registering custom finders for SearchContext
* Support using custom element classes

4.20.1 (2024-04-25)
=========================

* Returned accidentally removed DriverFinder.path and deprecated it.

4.20.0 (2024-04-24)
=========================

* Add CDP for Chrome 124 and remove 121
* Making Selenium Manager a thin wrapper (#13386)
* This change has been made to make it easier to maintain and improve, the interface has
changed and if users were invoking it, they might experience issues. Selenium Manager is
still in beta and these type of changes are expected.

4.19.0 (2024-03-27)
=========================

* Add CDP for Chrome 123 and remove 120
* Avoid over-escaping browser path (#13632)
* Add full RBS support (#13234)

4.18.1 (2024-02-19)
=========================

* Add CDP for Chrome 122 and remove 119

4.18.0 (2024-02-19)
=========================

* Update documentation link in readme (#13570)
* make suggested updates from rubocop

4.17.0 (2024-01-22)
=========================

* Logger defaults output to stderr instead of stdout
* Fully support Chrome 120+ old headless mode (#13271)
* Add ruby to Selenium Manager input for tracking (see #13288)
* Define default command_list (fixes #13307)
* Fix issues with incorrectly named edge browser
* Check for whether driver supports full page screenshots to error (#12799)
* Add CDP for Chrome 121 and remove 118

4.16.0 (2023-12-06)
=========================

Ruby:
* Add RBS files to Ruby (#12844)
* Convert binary locations for cygwin (#12618)
* Allow Selenium Manager to work with Unix (#13161)
* Extend RBS support for logger and log entry (#13192)
* Update rules_ruby to the latest version (#13235)

BiDi:
* Released selenium-devtools 0.120.0 (supports CDP v85, v118, v119, v120)

Chrome:
* Fix http proxy configuration for chrome (#13093)

Firefox:
* Delete 'lock' file in FF profile (#13090)

4.15.0 (2023-11-01)
=========================

* Do not set browser binary in selenium manager if it is an empty string (#12738)
* Add flaky condition to guards to mark unreliable tests
* Rake update needs to build latest grid for running remote tests
* Add CDP v119 and remove v116
* Implement file downloads (#12979)

4.14.0 (2023-10-09)
=========================
Ruby:
* allow users to access the full script of the atom directly

BiDi:
* Released selenium-devtools 0.118.0 (supports CDP v85, v116, v117, v118)

4.13.1 (2023-09-25)
=========================
Ruby:
* Fix bug preventing logging chromedriver to file

4.13.0 (2023-09-25)
=========================
Ruby:
* Fix bug preventing using performance logging with chromium
* Allow users to set Selenium Manager path by environment variable (#12752)
* Allow service to be started before the driver
* remove deprecated driver extensions for location and network connection

BiDi:
* Released selenium-devtools 0.117.0 (supports CDP v85, v115, v116, v117)

4.12.0 (2023-08-31)
=========================
Ruby:
* Fix bug preventing good error messages in Selenium Manager when stdout empty
* Fix bug with Firefox not loading net/http library by default (#12506)
* Remove support for using capabilities in local drivers

BiDi:
* Released selenium-devtools 0.116.0 (supports CDP v85, v114, v115, v116)

4.11.0 (2023-07-31)
=========================
Ruby:
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ Dir["#{__dir__}/*.gemspec"].each do |spec|
gemspec name: File.basename(spec, '.gemspec')
end

gem 'curb', '~> 1.0.5', require: false, platforms: %i[mri mingw x64_mingw]
gem 'debug', '~> 1.7', require: false, platforms: %i[mri mingw x64_mingw]
gem 'steep', '~> 1.5.0', require: false, platforms: %i[mri mingw x64_mingw]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 Software Freedom Conservancy (SFC)
Copyright 2024 Software Freedom Conservancy (SFC)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Copyright 2011-2023 Software Freedom Conservancy
Copyright 2011-2024 Software Freedom Conservancy
Copyright 2004-2011 Selenium committers
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# selenium-webdriver

This gem provides Ruby bindings for Selenium.
This is a fork from [selenium-webdriver 4.26.0 gem](https://rubygems.org/gems/selenium-webdriver/versions/4.26.0) updated to allow ruby 2.7. This update may not be stable, it's a temporary solution to use the new Selenium Manager that supports Chrome versions above 115 in applications that have not yet updated ruby to version 3.

It's a fork from [selenium-webdriver 4.11.0 gem](https://rubygems.org/gems/selenium-webdriver/versions/4.11.0) updated to allow ruby 2.7. This update may not be stable, it's a temporary solution to use the new Selenium Manager that supports Chrome versions above 115 in applications that have not yet updated ruby to version 3.
# selenium-webdriver

# Selenium Webdriver
This gem provides Ruby bindings for Selenium and supports MRI >= 3.0.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This gem provides Ruby bindings for Selenium and supports MRI >= 3.0.
This gem provides Ruby bindings for Selenium.


## Install

Expand All @@ -14,12 +12,12 @@ It's a fork from [selenium-webdriver 4.11.0 gem](https://rubygems.org/gems/selen

* https://rubygems.org/gems/selenium-webdriver
* https://www.selenium.dev/selenium/docs/api/rb/index.html
* https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings
* https://www.selenium.dev/documentation/?tab=ruby
* https://github.com/SeleniumHQ/selenium/issues

## License

Copyright 2009-2023 Software Freedom Conservancy
Copyright 2009-2024 Software Freedom Conservancy

Licensed to the Software Freedom Conservancy (SFC) under one
or more contributor license agreements. See the NOTICE file
Expand Down
Binary file modified bin/linux/selenium-manager
Binary file not shown.
Binary file modified bin/macos/selenium-manager
Binary file not shown.
Binary file modified bin/windows/selenium-manager.exe
Binary file not shown.
3 changes: 2 additions & 1 deletion lib/selenium/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def download_server(uri, destination)
def initialize(jar, opts = {})
raise Errno::ENOENT, jar unless File.exist?(jar)

@java = opts.fetch(:java, 'java')
@jar = jar
@host = '127.0.0.1'
@role = opts.fetch(:role, 'standalone')
Expand Down Expand Up @@ -241,7 +242,7 @@ def process
# extract any additional_args that start with -D as options
properties = @additional_args.dup - @additional_args.delete_if { |arg| arg[/^-D/] }
args = ['-jar', @jar, @role, '--port', @port.to_s]
server_command = ['java'] + properties + args + @additional_args
server_command = [@java] + properties + args + @additional_args
cp = WebDriver::ChildProcess.build(*server_command)

if @log.is_a?(String)
Expand Down
3 changes: 2 additions & 1 deletion lib/selenium/webdriver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
require 'json'
require 'set'
require 'uri'
require 'net/http'

require 'selenium/webdriver/atoms'
require 'selenium/webdriver/common'
Expand All @@ -48,7 +49,7 @@ module WebDriver
# @api private

def self.root
@root ||= File.expand_path('..', __dir__)
@root ||= File.expand_path('..', __dir__.to_s)
end

#
Expand Down
9 changes: 6 additions & 3 deletions lib/selenium/webdriver/atoms.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@
module Selenium
module WebDriver
module Atoms
def atom_script(function_name)
format("/* #{function_name} */return (%<atom>s).apply(null, arguments)",
atom: read_atom(function_name))
end

private

def read_atom(function)
File.read(File.expand_path("../atoms/#{function}.js", __FILE__))
end

def execute_atom(function_name, *arguments)
script = format("/* #{function_name} */return (%<atom>s).apply(null, arguments)",
atom: read_atom(function_name))
execute_script(script, *arguments)
execute_script(atom_script(function_name), *arguments)
end
end # Atoms
end # WebDriver
Expand Down
Loading