File tree Expand file tree Collapse file tree 6 files changed +11
-6
lines changed
rb/lib/selenium/webdriver Expand file tree Collapse file tree 6 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,9 @@ module Chrome
23
23
# @api private
24
24
class Bridge < Remote ::Bridge
25
25
def initialize ( opts = { } )
26
+ port = opts . delete ( :port ) || Service ::DEFAULT_PORT
26
27
unless opts . key? ( :url )
27
- @service = Service . new ( Chrome . driver_path , Service :: DEFAULT_PORT , *extract_service_args ( opts ) )
28
+ @service = Service . new ( Chrome . driver_path , port , *extract_service_args ( opts ) )
28
29
@service . start
29
30
opts [ :url ] = @service . uri
30
31
end
Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ module Edge
26
26
27
27
class Bridge < Remote ::W3CBridge
28
28
def initialize ( opts = { } )
29
+ port = opts . delete ( :port ) || Service ::DEFAULT_PORT
29
30
unless opts . key? ( :url )
30
- @service = Service . new ( Edge . driver_path , Service :: DEFAULT_PORT )
31
+ @service = Service . new ( Edge . driver_path , port )
31
32
@service . host = 'localhost' if @service . host == '127.0.0.1'
32
33
@service . start
33
34
opts [ :url ] = @service . uri
Original file line number Diff line number Diff line change @@ -23,9 +23,10 @@ module Firefox
23
23
# @api private
24
24
class W3CBridge < Remote ::W3CBridge
25
25
def initialize ( opts = { } )
26
+ port = opts . delete ( :port ) || Service ::DEFAULT_PORT
26
27
opts [ :desired_capabilities ] = create_capabilities ( opts )
27
28
28
- @service = Service . new ( Firefox . driver_path , Service :: DEFAULT_PORT )
29
+ @service = Service . new ( Firefox . driver_path , port )
29
30
@service . start
30
31
opts [ :url ] = @service . uri
31
32
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ module IE
26
26
27
27
class Bridge < Remote ::Bridge
28
28
def initialize ( opts = { } )
29
- port = opts . delete ( :port ) { Service ::DEFAULT_PORT }
29
+ port = opts . delete ( :port ) || Service ::DEFAULT_PORT
30
30
31
31
@service = Service . new ( IE . driver_path , port , *extract_service_args ( opts ) )
32
32
@service . start
Original file line number Diff line number Diff line change @@ -26,11 +26,12 @@ module PhantomJS
26
26
27
27
class Bridge < Remote ::Bridge
28
28
def initialize ( opts = { } )
29
+ port = opts . delete ( :port ) || Service ::DEFAULT_PORT
29
30
opts [ :desired_capabilities ] ||= Remote ::Capabilities . phantomjs
30
31
31
32
unless opts . key? ( :url )
32
33
args = opts . delete ( :args ) || opts [ :desired_capabilities ] [ 'phantomjs.cli.args' ]
33
- @service = Service . new ( PhantomJS . path , Service :: DEFAULT_PORT , *args )
34
+ @service = Service . new ( PhantomJS . path , port , *args )
34
35
@service . start
35
36
opts [ :url ] = @service . uri
36
37
end
Original file line number Diff line number Diff line change @@ -23,9 +23,10 @@ module Safari
23
23
# @api private
24
24
class AppleBridge < Remote ::Bridge
25
25
def initialize ( opts = { } )
26
+ port = opts . delete ( :port ) || Service ::DEFAULT_PORT
26
27
opts [ :desired_capabilities ] ||= Remote ::Capabilities . safari
27
28
28
- @service = Service . new ( Safari . driver_path , Service :: DEFAULT_PORT , *extract_service_args ( opts ) )
29
+ @service = Service . new ( Safari . driver_path , port , *extract_service_args ( opts ) )
29
30
@service . start
30
31
opts [ :url ] = @service . uri
31
32
You can’t perform that action at this time.
0 commit comments