Skip to content

Commit 115465e

Browse files
authored
chore: append example in wait
1 parent ad519ee commit 115465e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/appium_lib_core/common/wait.rb

+6
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class << self
3838
#
3939
# result = Appium::Core::Wait.until { @driver.find_element(:id, 'something') }
4040
#
41+
# result = Appium::Core::Wait.until(timeout: 30, message: 'timeout') { @driver.find_element(:id, 'something') }
42+
#
4143
# result = Appium::Core::Wait.until(object: 'some object') { |object|
4244
# @driver.find_element(:id, object)
4345
# }
@@ -82,6 +84,8 @@ def until(timeout: DEFAULT_TIMEOUT, interval: DEFAULT_INTERVAL, message: nil, ig
8284
#
8385
# Appium::Core::Wait.until_true { @driver.find_element(:id, 'something') }
8486
#
87+
# Appium::Core::Wait.until_true(timeout: 30) { @driver.find_element(:id, 'something') }
88+
#
8589
# Appium::Core::Wait.until_true(object: 'some object') { |object|
8690
# @driver.find_element(:id, object)
8791
# }
@@ -136,6 +140,7 @@ module Waitable
136140
# @example
137141
#
138142
# @core.wait_true { @driver.find_element :accessibility_id, 'something' }
143+
# @core.wait_true(timeout: 30, interval: 2) { @driver.find_element :accessibility_id, 'something' }
139144
#
140145
def wait_true(timeout: nil, interval: nil, message: nil, ignored: nil)
141146
Wait.until_true(timeout: timeout || @wait_timeout,
@@ -158,6 +163,7 @@ def wait_true(timeout: nil, interval: nil, message: nil, ignored: nil)
158163
# @example
159164
#
160165
# @core.wait { @driver.find_element :accessibility_id, 'something' }
166+
# @core.wait(timeout: 30, interval: 2) { @driver.find_element :accessibility_id, 'something' }
161167
#
162168
def wait(timeout: nil, interval: nil, message: nil, ignored: nil)
163169
Wait.until(timeout: timeout || @wait_timeout,

0 commit comments

Comments
 (0)