Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Commit

Permalink
#6 propagate params down to inner wait_for_true function
Browse files Browse the repository at this point in the history
  • Loading branch information
maticrivo committed Apr 19, 2015
1 parent 2987f25 commit 07999e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions magneto/magneto.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def wait_for_element(self, timeout=None, **kwargs):
el.wait.exists(timeout=timeout)
return el

def wait_for_true(self, function, timeout=15000):
def wait_for_true(self, function, timeout=15000, **kwargs):
"""
Waits for given function to return True::
Expand All @@ -133,7 +133,7 @@ def wait_for_true(self, function, timeout=15000):
try:
with Timeout(seconds=timeout/1000):
while not result:
result = function()
result = function(**kwargs)
time.sleep(0.5)

except TimeoutError:
Expand Down

0 comments on commit 07999e2

Please sign in to comment.