Skip to content

Commit 4fee2c9

Browse files
committed
update documentation
1 parent a8b94c0 commit 4fee2c9

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ opts = {
5252
appium_lib: {
5353
}
5454
}
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
5757

5858
# Launch iPhone Simulator and `MyiOS.app`
5959
@driver.find_element(:accessibility_id, 'some accessibility') # find an element

lib/appium_lib_core/device/multi_touch.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module Core
1818
# multi_touch_action.perform
1919
#
2020
# # with an arbitrary driver
21-
# driver = Appium::Driver.new(opts, false).start_driver
21+
# driver = Appium::Core.for(self, opts).start_driver
2222
# multi_touch_action = MultiTouch.new(driver)
2323
# multi_touch_action.add action_1
2424
# multi_touch_action.add action_2

lib/appium_lib_core/driver.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ def initialize(target, opts = {})
143143
# wait_interval: 0.3,
144144
# }
145145
# }
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`
147148
# @driver = @core.start_driver
148149
#
150+
149151
def start_driver(server_url: nil,
150152
http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
151153
server_url = server_url ? server_url : "http://127.0.0.1:#{@port}/wd/hub"

0 commit comments

Comments
 (0)