diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-07-15 15:45:25 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-07-15 21:55:40 +0200 |
commit | 5d0de0b3451754652b840b77c0765c2b1153add8 (patch) | |
tree | 43c583dbed94eb6e66c943fab10f15680fe1aba1 /uitest | |
parent | 626a9e73a0ed8072a5a078dceaf1b4e2ec9ef0d5 (diff) |
Simplify use of close_dialog_through_button: allow button by name
Change-Id: I59a74e7221808308853f0d893a416fababaf2318
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170493
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/uitest/test.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index e6491af3f67f..0ba35a98d9b9 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -192,6 +192,8 @@ class UITest(object): def close_dialog_through_button(self, button, dialog=None): if dialog is None: dialog = self._xUITest.getTopFocusWindow() + if isinstance(button, str): + button = dialog.getChild(button) with EventListener(self._xContext, "DialogClosed" ) as event: button.executeAction("CLICK", tuple()) while True: |