@@ -18,41 +18,42 @@ class Driver
18
18
# @return [Hash]
19
19
attr_reader :automation_name
20
20
21
- # Custom URL for the selenium server. If set this attribute, ruby_lib try to handshake to the custom url.
21
+ # Custom URL for the selenium server. If set this attribute, ruby_lib_core try to handshake to the custom url.
22
+ # False is by default and then "http://127.0.0.1:#{@port}/wd/hub" is used.
22
23
# @return [String]
23
24
attr_reader :custom_url
24
25
25
- # Export session id to textfile in /tmp for 3rd party tools
26
+ # Export session id to textfile in /tmp for 3rd party tools. False bu default.
26
27
# @return [Boolean]
27
28
attr_reader :export_session
28
29
# @return [String] By default, session id is exported in '/tmp/appium_lib_session'
29
30
attr_reader :export_session_path
30
31
31
32
# Default wait time for elements to appear
32
- # Returns the default client side wait.
33
- # This value is independent of what the server is using
34
- # Provide Appium::Drive like { appium_lib: { wait: 20 } }
33
+ # Returns the default client side wait. 20 second is by default.
34
+ # Provide Appium::Drive like { appium_lib: { wait: 30 } }
35
35
# @return [Integer]
36
36
attr_reader :default_wait
37
37
38
- # Appium's server port
38
+ # Appium's server port. 4723 is by default.
39
39
# Provide Appium::Drive like { appium_lib: { port: 8080 } }
40
40
# @return [Integer]
41
41
attr_reader :port
42
42
43
- # Return a time wait timeout
43
+ # Return a time wait timeout. 30 second is by default.
44
44
# Wait time for ::Appium::Core::Base::Wait, wait and wait_true
45
45
# Provide Appium::Drive like { appium_lib: { wait_timeout: 20 } }
46
46
# @return [Integer]
47
47
attr_reader :wait_timeout
48
48
49
- # Return a time wait timeout
49
+ # Return a time to wait interval. 0.5 second is by default.
50
50
# Wait interval time for ::Appium::Core::Base::Wait, wait and wait_true
51
- # Provide Appium::Drive like { appium_lib: { wait_interval: 20 } }
51
+ # Provide Appium::Drive like { appium_lib: { wait_interval: 0.1 } }
52
52
# @return [Integer]
53
53
attr_reader :wait_interval
54
54
55
55
# instance of AbstractEventListener for logging support
56
+ # Nil by default
56
57
attr_reader :listener
57
58
58
59
# @return [Appium::Core::Base::Driver]
@@ -66,12 +67,15 @@ class Driver
66
67
# @example
67
68
#
68
69
# require 'rubygems'
69
- # require 'appium_lib '
70
+ # require 'appium_lib_core '
70
71
#
71
72
# # Start iOS driver
72
73
# opts = {
73
74
# caps: {
74
75
# platformName: :ios,
76
+ # platformVersion: '11.0',
77
+ # deviceName: 'iPhone Simulator',
78
+ # automationName: 'XCUITest',
75
79
# app: '/path/to/MyiOS.app'
76
80
# },
77
81
# appium_lib: {
@@ -84,8 +88,8 @@ class Driver
84
88
# listener: nil,
85
89
# }
86
90
# }
87
- # @core_driver = Appium::Core.for(self, opts) # create a core driver with `opts` and extend methods into `self`
88
- # @core_driver .start_driver(server_url: server_url, http_client_ops: http_client_ops ) # start driver
91
+ # @core = Appium::Core.for(self, opts) # create a core driver with `opts` and extend methods into `self`
92
+ # @core .start_driver(server_url: server_url) # start driver
89
93
#
90
94
def self . for ( target , opts = { } )
91
95
new ( target , opts )
@@ -120,24 +124,23 @@ def initialize(target, opts = {})
120
124
# @example
121
125
#
122
126
# require 'rubygems'
123
- # require 'appium_lib '
127
+ # require 'appium_lib_core '
124
128
#
125
129
# # platformName takes a string or a symbol.
126
130
#
127
131
# # Start iOS driver
128
132
# opts = {
129
133
# caps: {
130
134
# platformName: :ios,
135
+ # platformVersion: '11.0',
136
+ # deviceName: 'iPhone Simulator',
137
+ # automationName: 'XCUITest',
131
138
# app: '/path/to/MyiOS.app'
132
139
# },
133
140
# appium_lib: {
134
- # server_url: "http://custom-host:8080/wd/hub.com",
135
- # export_session: false,
136
- # port: 8080,
137
- # wait: 0,
141
+ # wait: 20,
138
142
# wait_timeout: 20,
139
143
# wait_interval: 0.3,
140
- # listener: nil,
141
144
# }
142
145
# }
143
146
# @core = Appium::Driver.new(opts)
@@ -407,7 +410,7 @@ def set_app_path
407
410
# @private
408
411
def set_appium_lib_specific_values ( appium_lib_opts )
409
412
@custom_url = appium_lib_opts . fetch :server_url , false
410
- @default_wait = appium_lib_opts . fetch :wait , 0
413
+ @default_wait = appium_lib_opts . fetch :wait , 20
411
414
412
415
# bump current session id into a particular file
413
416
@export_session = appium_lib_opts . fetch :export_session , false
0 commit comments