Skip to content

Commit 961d0c4

Browse files
authored
Merge branch 'master' into feat/remove-implicit-capabilities-handling
2 parents 7b5588e + f8c40d0 commit 961d0c4

11 files changed

Lines changed: 57 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
All notable changes to this project will be documented in this file.
33
Read `release_notes.md` for commit level details.
44

5+
## [13.1.0] - 2026-07-13
6+
- Compatible with selenium 4.46
7+
58
## [13.0.1] - 2026-06-07
69
- Update the `rbs_collection.lock.yaml`
710

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gem 'minitest', '~> 5.0'
88
gem 'minitest-reporters', '~> 1.1'
99
gem 'parallel_tests'
1010
gem 'rake', '~> 13.0'
11-
gem 'rubocop', '1.88.0'
11+
gem 'rubocop', '1.88.2'
1212
gem 'simplecov'
1313
gem 'steep', '~> 1.10.0'
1414
gem 'webmock', '~> 3.26.0'

lib/appium_lib_core/common/base/bridge.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ class Bridge < ::Selenium::WebDriver::Remote::Bridge
4747
# No 'browserName' means the session is native appium connection
4848
APPIUM_NATIVE_BROWSER_NAME = 'appium'
4949

50+
# Selenium 4.46 moved server URL configuration from Bridge to the HTTP client.
51+
def initialize(url:, http_client: nil)
52+
if selenium_bridge_accepts_url?
53+
super
54+
else
55+
http_client ||= ::Selenium::WebDriver::Remote::Http::Default.new
56+
http_client.server_url = url
57+
super(http_client: http_client)
58+
end
59+
end
60+
5061
def browser
5162
@browser ||= begin
5263
name = @capabilities&.browser_name
@@ -137,6 +148,12 @@ def add_appium_prefix(capabilities)
137148

138149
private
139150

151+
def selenium_bridge_accepts_url?
152+
::Selenium::WebDriver::Remote::Bridge.instance_method(:initialize).parameters.any? do |_, name|
153+
name == :url
154+
end
155+
end
156+
140157
def camel_case(str_or_sym)
141158
str_or_sym.to_s.gsub(/_([a-z])/) { Regexp.last_match(1)&.upcase }
142159
end

lib/appium_lib_core/common/base/http_default.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ def delete_additional_header(key)
6363
#
6464
# @return [URI] An instance of URI updated to. Returns default +server_url+ if some of arguments are +nil+
6565
def update_sending_request_to(scheme:, host:, port:, path:)
66-
return @server_url unless validate_url_param(scheme, host, port, path)
66+
return server_url unless validate_url_param(scheme, host, port, path)
6767

6868
# Add / if 'path' does not have it
6969
path = "/#{path}" unless path.start_with?('/')
7070
path = "#{path}/" unless path.end_with?('/')
7171

7272
@http = nil
73-
@server_url = URI.parse "#{scheme}://#{host}:#{port}#{path}"
73+
self.server_url = URI.parse "#{scheme}://#{host}:#{port}#{path}"
7474
end
7575

7676
private

lib/appium_lib_core/version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
module Appium
1616
module Core
17-
VERSION = '13.0.1' unless defined? ::Appium::Core::VERSION
18-
DATE = '2026-06-07' unless defined? ::Appium::Core::DATE
17+
VERSION = '13.1.0' unless defined? ::Appium::Core::VERSION
18+
DATE = '2026-07-13' unless defined? ::Appium::Core::DATE
1919
end
2020
end

release_notes.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
#### v13.1.0 2026-07-13
2+
3+
- [e099307](https://github.com/appium/ruby_lib_core/commit/e099307ee1868986215f66002caf05b6f514aafe) Release 13.1.0
4+
- [99a248d](https://github.com/appium/ruby_lib_core/commit/99a248d25b89871eb1714530f1628fccbe9ee24c) fix: seleium 4.46 compatibility (#690)
5+
- [77b9cca](https://github.com/appium/ruby_lib_core/commit/77b9cca7c3cebc73b6be971696642d8116479fd5) chore(deps): update rubocop requirement from 1.88.1 to 1.88.2 (#688)
6+
- [f3718af](https://github.com/appium/ruby_lib_core/commit/f3718af5bcc1ed6ea272037501125039ffba5898) fix: fix selneium version up to 4.45
7+
- [3aa4877](https://github.com/appium/ruby_lib_core/commit/3aa4877b241328721a69acda3cb012f82af42722) chore(deps): update rubocop requirement from 1.88.0 to 1.88.1 (#687)
8+
- [1d9485e](https://github.com/appium/ruby_lib_core/commit/1d9485e28d44124a73135f7ff761d25ddcf705b6) chore(deps): bump actions/cache from 5 to 6 (#686)
9+
- [903cf60](https://github.com/appium/ruby_lib_core/commit/903cf60b3232e691983597f60b606e51efdf12c9) chore(deps): update rubocop requirement from 1.87.0 to 1.88.0 (#684)
10+
- [79cbc8e](https://github.com/appium/ruby_lib_core/commit/79cbc8eacf9d66acae8a090811d5cfcd72929b44) chore(deps): bump actions/checkout from 6 to 7 (#685)
11+
12+
113
#### v13.0.1 2026-06-07
214

315
- [faa52fc](https://github.com/appium/ruby_lib_core/commit/faa52fc2cc6bc72a8992f90c5acc6fd18e2b6401) Release 13.0.1

sig/gems/selenium/bridge.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module Selenium
3030

3131
attr_reader capabilities: untyped
3232

33-
def initialize: (url: String | URI, ?http_client: untyped?) -> void
33+
def initialize: (?url: untyped, ?http_client: untyped?) -> void
3434

3535
def cancel_fedcm_dialog: -> nil
3636

sig/lib/appium_lib_core/common/base/bridge.rbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ module Appium
4949
# No 'browserName' means the session is native appium connection
5050
APPIUM_NATIVE_BROWSER_NAME: "appium"
5151

52+
def initialize: (url: untyped, ?http_client: untyped?) -> void
53+
5254
def browser: () -> untyped
5355

5456
# Appium only.
@@ -103,6 +105,8 @@ module Appium
103105

104106
private
105107

108+
def selenium_bridge_accepts_url?: () -> bool
109+
106110
def camel_case: (untyped str_or_sym) -> untyped
107111

108112
def extension_prefix?: (untyped capability_name) -> untyped

sig/lib/appium_lib_core/common/base/driver.rbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module Appium
22
module Core
33
class Base
44
class Driver < Selenium::WebDriver::Driver
5+
extend Forwardable
6+
57
@wait_timeout: untyped
68

79
@wait_interval: untyped

sig/lib/appium_lib_core/driver.rbs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ module Appium
7575
attr_reader path: String
7676

7777
def initialize: (Hash[String | Symbol, String] capabilities) -> void
78+
79+
def valid?: () -> bool
80+
81+
private
82+
83+
def resolve_addresses: (String host) -> Array[String]
84+
85+
def ip_literal?: (String host) -> bool
86+
87+
def disallowed?: (String ip) -> bool
7888
end
7989

8090
class Driver

0 commit comments

Comments
 (0)