Skip to content

Commit 2b2614f

Browse files
committed
Remove deprecated :port Remote::Bridge initialization argument
It has been deprecated since 3.3.0. Use :url instead.
1 parent 855e48d commit 2b2614f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

rb/lib/selenium/webdriver/remote/bridge.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Bridge
2222
include Atoms
2323
include BridgeHelper
2424

25+
PORT = 4444
2526
COMMANDS = {
2627
new_session: [:post, 'session'.freeze]
2728
}.freeze
@@ -65,20 +66,15 @@ def self.handshake(**opts)
6566
# Initializes the bridge with the given server URL
6667
# @param [Hash] opts options for the driver
6768
# @option opts [String] :url url for the remote server
68-
# @option opts [Integer] :port port number for the remote server
6969
# @option opts [Object] :http_client an HTTP client instance that implements the same protocol as Http::Default
7070
# @option opts [Capabilities] :desired_capabilities an instance of Remote::Capabilities describing the capabilities you want
7171
# @api private
7272
#
7373

7474
def initialize(opts = {})
7575
opts = opts.dup
76-
77-
WebDriver.logger.deprecate ':port', 'full URL' if opts.key?(:port)
78-
port = opts.delete(:port) || 4444
79-
8076
http_client = opts.delete(:http_client) { Http::Default.new }
81-
url = opts.delete(:url) { "http://#{Platform.localhost}:#{port}/wd/hub" }
77+
url = opts.delete(:url) { "http://#{Platform.localhost}:#{PORT}/wd/hub" }
8278

8379
unless opts.empty?
8480
raise ArgumentError, "unknown option#{'s' if opts.size != 1}: #{opts.inspect}"

0 commit comments

Comments
 (0)