diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-24 10:25:09 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-24 14:14:58 +0100 |
commit | 6631aa3060ebbb3462391d784e406ac2a1060f8c (patch) | |
tree | da54bb5783171116b5a3ad1c4797ad6a54105f7a /uitest | |
parent | 16901e4ccad95d55d4ae0fa2d6f6103b4177592e (diff) |
uitest: no need to pass the parent as a parameter
Change-Id: I750b5600d3e4ef8ba5a0666133b9066904b4cbec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111450
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/uitest/test.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index 675d8eea4e03..6c10d9821016 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -48,15 +48,21 @@ class UITest(object): if component is not None: return component - def wait_until_child_is_available(self, parent, childName): + def wait_until_child_is_available(self, childName): time_ = 0 + xChild = None + while time_ < MAX_WAIT: - if childName in parent.getChildren(): + xDialog = self._xUITest.getTopFocusWindow() + if childName in xDialog.getChildren(): + xChild = xDialog.getChild(childName) break else: time_ += DEFAULT_SLEEP time.sleep(DEFAULT_SLEEP) + return xChild + def wait_until_property_is_updated(self, element, propertyName, value): time_ = 0 while time_ < MAX_WAIT: |