Skip to content

Commit

Permalink
#202 - improve consistency for present() / visible()
Browse files Browse the repository at this point in the history
make visual automation timeout to 1 second instead of default 10 seconds to be consistent with present() and visible()
  • Loading branch information
kensoh committed Jun 5, 2018
1 parent 29d16ca commit 95a066e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/tagui.sikuli/tagui.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# SIKULI INTERFACE FOR TAGUI FRAMEWORK ~ TEBEL.ORG #

# timeout in seconds for finding a web element
setAutoWaitTimeout(10)
# timeout in seconds for finding an element
wait_timeout = 10
setAutoWaitTimeout(wait_timeout)

# delay in seconds between scanning for inputs
scan_period = 0.5
Expand Down Expand Up @@ -148,10 +149,14 @@ def vision_intent ( raw_intent ):
return 1

def visible_intent ( raw_intent ):
setAutoWaitTimeout(1)
params = (raw_intent + ' ')[1+(raw_intent + ' ').find(' '):].strip()
print '[tagui] ACTION - ' + raw_intent.strip()
if exists(params):
setAutoWaitTimeout(wait_timeout)
return 1
else:
setAutoWaitTimeout(wait_timeout)
return 0

# function to interpret input intent
Expand Down

0 comments on commit 95a066e

Please # to comment.