File tree Expand file tree Collapse file tree 13 files changed +28
-90
lines changed
spec/integration/selenium/webdriver/spec_support Expand file tree Collapse file tree 13 files changed +28
-90
lines changed Original file line number Diff line number Diff line change @@ -27,23 +27,11 @@ module Selenium
27
27
module WebDriver
28
28
module Chrome
29
29
def self . driver_path = ( path )
30
- warn <<-DEPRECATE . gsub ( /\n +| {2,}/ , ' ' ) . freeze
31
- [DEPRECATION] `driver_path=` is deprecated. Pass the driver path as an option instead.
32
- e.g. Selenium::WebDriver.for :chrome, driver_path: '/path'
33
- DEPRECATE
34
-
35
30
Platform . assert_executable path
36
31
@driver_path = path
37
32
end
38
33
39
- def self . driver_path ( warning = true )
40
- if warning
41
- warn <<-DEPRECATE . gsub ( /\n +| {2,}/ , ' ' ) . freeze
42
- [DEPRECATION] `driver_path` is deprecated. Pass the driver path as an option instead.
43
- e.g. Selenium::WebDriver.for :chrome, driver_path: '/path'
44
- DEPRECATE
45
- end
46
-
34
+ def self . driver_path
47
35
@driver_path ||= nil
48
36
end
49
37
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def initialize(opts = {})
31
31
end
32
32
33
33
unless opts . key? ( :url )
34
- driver_path = opts . delete ( :driver_path ) || Chrome . driver_path ( false )
34
+ driver_path = opts . delete ( :driver_path ) || Chrome . driver_path
35
35
@service = Service . new ( driver_path , port , *extract_service_args ( service_args ) )
36
36
@service . start
37
37
opts [ :url ] = @service . uri
Original file line number Diff line number Diff line change @@ -26,23 +26,11 @@ module Selenium
26
26
module WebDriver
27
27
module Edge
28
28
def self . driver_path = ( path )
29
- warn <<-DEPRECATE . gsub ( /\n +| {2,}/ , ' ' ) . freeze
30
- [DEPRECATION] `driver_path=` is deprecated. Pass the driver path as an option instead.
31
- e.g. Selenium::WebDriver.for :edge, driver_path: '/path'
32
- DEPRECATE
33
-
34
29
Platform . assert_executable path
35
30
@driver_path = path
36
31
end
37
32
38
33
def self . driver_path ( warning = true )
39
- if warning
40
- warn <<-DEPRECATE . gsub ( /\n +| {2,}/ , ' ' ) . freeze
41
- [DEPRECATION] `driver_path` is deprecated. Pass the driver path as an option instead.
42
- e.g. Selenium::WebDriver.for :edge, driver_path: '/path'
43
- DEPRECATE
44
- end
45
-
46
34
@driver_path ||= nil
47
35
end
48
36
end # Edge
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def initialize(opts = {})
30
30
service_args = opts . delete ( :service_args ) || { }
31
31
32
32
unless opts . key? ( :url )
33
- driver_path = opts . delete ( :driver_path ) || Edge . driver_path ( false )
33
+ driver_path = opts . delete ( :driver_path ) || Edge . driver_path
34
34
@service = Service . new ( driver_path , port , *extract_service_args ( service_args ) )
35
35
@service . host = 'localhost' if @service . host == '127.0.0.1'
36
36
@service . start
Original file line number Diff line number Diff line change @@ -42,23 +42,11 @@ module Firefox
42
42
DEFAULT_LOAD_NO_FOCUS_LIB = false
43
43
44
44
def self . driver_path = ( path )
45
- warn <<-DEPRECATE . gsub ( /\n +| {2,}/ , ' ' ) . freeze
46
- [DEPRECATION] `driver_path=` is deprecated. Pass the driver path as an option instead.
47
- e.g. Selenium::WebDriver.for :firefox, driver_path: '/path'
48
- DEPRECATE
49
-
50
45
Platform . assert_executable path
51
46
@driver_path = path
52
47
end
53
48
54
- def self . driver_path ( warning = true )
55
- if warning
56
- warn <<-DEPRECATE . gsub ( /\n +| {2,}/ , ' ' ) . freeze
57
- [DEPRECATION] `driver_path` is deprecated. Pass the driver path as an option instead.
58
- e.g. Selenium::WebDriver.for :firefox, driver_path: '/path'
59
- DEPRECATE
60
- end
61
-
49
+ def self . driver_path
62
50
@driver_path ||= nil
63
51
end
64
52
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def initialize(opts = {})
27
27
opts [ :desired_capabilities ] = create_capabilities ( opts )
28
28
service_args = opts . delete ( :service_args ) || { }
29
29
30
- driver_path = opts . delete ( :driver_path ) || Firefox . driver_path ( false )
30
+ driver_path = opts . delete ( :driver_path ) || Firefox . driver_path
31
31
@service = Service . new ( driver_path , port , *extract_service_args ( service_args ) )
32
32
@service . start
33
33
opts [ :url ] = @service . uri
Original file line number Diff line number Diff line change @@ -24,23 +24,11 @@ module Selenium
24
24
module WebDriver
25
25
module IE
26
26
def self . driver_path = ( path )
27
- warn <<-DEPRECATE . gsub ( /\n +| {2,}/ , ' ' ) . freeze
28
- [DEPRECATION] `driver_path=` is deprecated. Pass the driver path as an option instead.
29
- e.g. Selenium::WebDriver.for :ie, driver_path: '/path'
30
- DEPRECATE
31
-
32
27
Platform . assert_executable path
33
28
@driver_path = path
34
29
end
35
30
36
- def self . driver_path ( warning = true )
37
- if warning
38
- warn <<-DEPRECATE . gsub ( /\n +| {2,}/ , ' ' ) . freeze
39
- [DEPRECATION] `driver_path` is deprecated. Pass the driver path as an option instead.
40
- e.g. Selenium::WebDriver.for :ie, driver_path: '/path'
41
- DEPRECATE
42
- end
43
-
31
+ def self . driver_path
44
32
@driver_path ||= nil
45
33
end
46
34
end # IE
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def initialize(opts = {})
29
29
port = opts . delete ( :port ) || Service ::DEFAULT_PORT
30
30
service_args = opts . delete ( :service_args ) || { }
31
31
service_args = match_legacy ( opts , service_args )
32
- driver_path = opts . delete ( :driver_path ) || IE . driver_path ( false )
32
+ driver_path = opts . delete ( :driver_path ) || IE . driver_path
33
33
34
34
@service = Service . new ( driver_path , port , *extract_service_args ( service_args ) )
35
35
@service . start
Original file line number Diff line number Diff line change 25
25
module Selenium
26
26
module WebDriver
27
27
module PhantomJS
28
- def self . path = ( path )
29
- warn <<-DEPRECATE . gsub ( /\n +| {2,}/ , ' ' ) . freeze
30
- [DEPRECATION] `path=` is deprecated. Pass the driver path as an option instead.
31
- e.g. Selenium::WebDriver.for :phantomjs, driver_path: '/path'
32
- DEPRECATE
33
-
34
- Platform . assert_executable path
35
- @path = path
36
- end
37
-
38
- def self . path ( warning = true )
39
- if warning
40
- warn <<-DEPRECATE . gsub ( /\n +| {2,}/ , ' ' ) . freeze
41
- [DEPRECATION] `path` is deprecated. Pass the driver path as an option instead.
42
- e.g. Selenium::WebDriver.for :phantomjs, driver_path: '/path'
43
- DEPRECATE
28
+ class << self
29
+ def path = ( path )
30
+ Platform . assert_executable path
31
+ @path = path
44
32
end
33
+ alias_method :driver_path= , :path=
45
34
46
- @path ||= nil
35
+ def path
36
+ @path ||= nil
37
+ end
38
+ alias_method :driver_path , :path
47
39
end
48
40
end # PhantomJS
49
41
end # WebDriver
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def initialize(opts = {})
30
30
opts [ :desired_capabilities ] ||= Remote ::Capabilities . phantomjs
31
31
32
32
unless opts . key? ( :url )
33
- driver_path = opts . delete ( :driver_path ) || PhantomJS . path ( false )
33
+ driver_path = opts . delete ( :driver_path ) || PhantomJS . path
34
34
args = opts . delete ( :args ) || opts [ :desired_capabilities ] [ 'phantomjs.cli.args' ]
35
35
@service = Service . new ( driver_path , port , *args )
36
36
@service . start
You can’t perform that action at this time.
0 commit comments