File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ opts = {
52
52
appium_lib: {
53
53
}
54
54
}
55
- @core = Appium ::Driver . new ( opts) # core driver
56
- @driver = @core .start_driver # driver extend selenium-webdriver
55
+ @core = Appium ::Core .for( self , opts) # create a core driver with `opts` and extend methods into `self`
56
+ @driver = @core .start_driver
57
57
58
58
# Launch iPhone Simulator and `MyiOS.app`
59
59
@driver .find_element(:accessibility_id , ' some accessibility' ) # find an element
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ module Core
18
18
# multi_touch_action.perform
19
19
#
20
20
# # with an arbitrary driver
21
- # driver = Appium::Driver.new(opts, false ).start_driver
21
+ # driver = Appium::Core.for(self, opts ).start_driver
22
22
# multi_touch_action = MultiTouch.new(driver)
23
23
# multi_touch_action.add action_1
24
24
# multi_touch_action.add action_2
Original file line number Diff line number Diff line change @@ -143,9 +143,11 @@ def initialize(target, opts = {})
143
143
# wait_interval: 0.3,
144
144
# }
145
145
# }
146
- # @core = Appium::Driver.new(opts)
146
+ #
147
+ # @core = Appium::Core.for(self, opts) # create a core driver with `opts` and extend methods into `self`
147
148
# @driver = @core.start_driver
148
149
#
150
+
149
151
def start_driver ( server_url : nil ,
150
152
http_client_ops : { http_client : nil , open_timeout : 999_999 , read_timeout : 999_999 } )
151
153
server_url = server_url ? server_url : "http://127.0.0.1:#{ @port } /wd/hub"
You can’t perform that action at this time.
0 commit comments