File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -105,11 +105,27 @@ class Driver
105
105
# }
106
106
# Appium::Driver.new(opts, false).start_driver
107
107
#
108
+ # # Start iOS driver without global scope
109
+ # opts = {
110
+ # caps: {
111
+ # platformName: :ios,
112
+ # app: '/path/to/MyiOS.app'
113
+ # },
114
+ # appium_lib: {
115
+ # wait_timeout: 30
116
+ # },
117
+ # global_driver: false
118
+ # }
119
+ # Appium::Driver.new(opts).start_driver
120
+ #
108
121
# @param opts [Object] A hash containing various options.
109
122
# @param global_driver [Bool] A bool require global driver before initialize.
110
123
# @return [Driver]
111
124
def initialize ( opts = { } , global_driver = nil )
112
125
# TODO: set `global_driver = false` by default in the future.
126
+ # Capybara can't put `global_driver` as the 2nd argument.
127
+ global_driver = opts . delete :global_driver if global_driver . nil?
128
+
113
129
if global_driver . nil?
114
130
warn '[DEPRECATION] Appium::Driver.new(opts) will not generate global driver by default.' \
115
131
'If you would like to generate the global driver dy default, ' \
You can’t perform that action at this time.
0 commit comments