Skip to content

Commit

Permalink
docstring and typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EOKruglov authored and vasily-v-ryabov committed Feb 27, 2022
1 parent 432bd68 commit 11e72a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pywinauto/base_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def find(self, timeout=None, retry_interval=None):
def find_all(self, timeout=None, retry_interval=None):
"""
Find all controls using criteria. The returned controls match conditions from criteria[-1].
Parent controls are assumed to exist in a single instance. Otherwise it will result in an AmbiguousError.
Parent controls are assumed to exist in a single instance. Otherwise it will result in an ElementAmbiguousError.
* **criteria** - a list with dictionaries
Expand Down Expand Up @@ -389,7 +389,7 @@ def wait(self, wait_for, timeout=None, retry_interval=None):

for condition in correct_wait_for:
time_left -= timestamp() - start
if time_left < 0.0:
if time_left <= 0.0:
raise TimeoutError("Timed out: not enough time to check the condition {}.".format(condition))
if condition == 'exists':
continue
Expand Down Expand Up @@ -457,7 +457,7 @@ def wait_not(self, wait_for, timeout=None, retry_interval=None):
return
for condition in correct_wait_for:
time_left -= timestamp() - start
if time_left < 0.0:
if time_left <= 0.0:
raise TimeoutError('Timed out: not enough time to check the condition {}'.format(condition))
if condition not in WindowSpecification.WAIT_NOT_CRITERIA_MAP.keys():
raise SyntaxError("Invalid criteria: {}!".format(condition))
Expand Down

0 comments on commit 11e72a4

Please sign in to comment.