Skip to content

Commit 77a7736

Browse files
committedNov 25, 2013
wait and wait_true no longer use default_wait
Waits are easier to understand if the default wait is a static 30 seconds.
1 parent 18a4b94 commit 77a7736

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed
 

‎lib/appium_lib/common/helper.rb

+2-18
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,7 @@ module Appium::Common
3030
# @param interval [Float] the time in seconds to wait after calling the block
3131
# @param block [Block] the block to call
3232
# @return [Object] the result of block.call
33-
def wait max_wait=-1, interval=0.5, &block
34-
if max_wait == -1
35-
max_wait = begin
36-
$driver.default_wait
37-
rescue
38-
end
39-
max_wait ||= 30
40-
end
41-
33+
def wait max_wait=30, interval=0.5, &block
4234
max_wait = 1 if max_wait <= 0
4335
result = nil
4436
timeout max_wait do
@@ -60,15 +52,7 @@ def ignore &block
6052
# @param interval [Float] the time in seconds to wait after calling the block
6153
# @param block [Block] the block to call
6254
# @return [Object] the result of block.call
63-
def wait_true max_wait=-1, interval=0.5, &block
64-
if max_wait == -1
65-
max_wait = begin
66-
$driver.default_wait
67-
rescue
68-
end
69-
max_wait ||= 30
70-
end
71-
55+
def wait_true max_wait=30, interval=0.5, &block
7256
max_wait = 1 if max_wait <= 0
7357
result = nil
7458
timeout max_wait do

0 commit comments

Comments
 (0)
Please sign in to comment.