Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
removing debug lines in wait() and adding documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
www committed Jun 19, 2023
1 parent 9fbaea0 commit d4ca19d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,12 @@ def save_screenshot(name):
f.write(image)

# Wait command, default 1 second
# Loading multiplier is defined in settings, it is a decimally notated % multiplier. E.G:
# 0.9 will run with 90% of the default wait times
# 2.0 will run with 200% of the default wait times
# This is handy for slower machines where we need to wait for sections/images to load
def wait(seconds=1):
print('waiting: ' + str(seconds*float(config.get('ADVANCED', 'loadingMuliplier'))) + ' seconds')
time.sleep(seconds*float(config.get('ADVANCED', 'loadingMuliplier')))
time.sleep(seconds * float(config.get('ADVANCED', 'loadingMuliplier')))

def swipe(x1, y1, x2, y2, duration=100, seconds=1):
device.shell('input swipe ' + str(x1) + ' ' + str(y1) + ' ' + str(x2) + ' ' + str(y2) + ' ' + str(duration))
Expand Down

0 comments on commit d4ca19d

Please sign in to comment.