sd/qa/uitest/impress_tests/save_readonly_with_password.py | 10 +++++----- sw/qa/uitest/writer_tests6/save_readonly_with_password.py | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit b551c9e24a51b9443f3b0c17d354eed4f4953403 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Nov 24 10:32:08 2021 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Nov 24 14:27:22 2021 +0100 uitest: use execute_dialog_through_action in these cases too Change-Id: I899cdbe24b4277623f72b23a8c877feed867a594 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125753 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/qa/uitest/impress_tests/save_readonly_with_password.py b/sd/qa/uitest/impress_tests/save_readonly_with_password.py index cd4fe98339c0..8ec8fdef5f28 100644 --- a/sd/qa/uitest/impress_tests/save_readonly_with_password.py +++ b/sd/qa/uitest/impress_tests/save_readonly_with_password.py @@ -36,7 +36,7 @@ class save_readonly_with_password(UITestCase): xPasswordCheckButton.executeAction("CLICK", tuple()) xOpen = xSaveDialog.getChild("open") - with self.ui_test.execute_dialog_through_action(xOpen, "CLICK") as xPasswordDialog: + with self.ui_test.execute_dialog_through_action(xOpen, "CLICK", close_button="") as xPasswordDialog: xReadonly = xPasswordDialog.getChild("readonly") xReadonly.executeAction("CLICK", tuple()) xNewPassword = xPasswordDialog.getChild("newpassroEntry") @@ -44,10 +44,10 @@ class save_readonly_with_password(UITestCase): xConfirmPassword = xPasswordDialog.getChild("confirmropassEntry") xConfirmPassword.executeAction("TYPE", mkPropertyValues({"TEXT": "password"})) - # PPTX confirmation dialog is displayed - xWarnDialog = self.xUITest.getTopFocusWindow() - xSave = xWarnDialog.getChild("save") - self.ui_test.close_dialog_through_button(xSave) + xOk = xPasswordDialog.getChild("ok") + # PPTX confirmation dialog is displayed + with self.ui_test.execute_dialog_through_action(xOk, "CLICK", close_button="save"): + pass with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as document: diff --git a/sw/qa/uitest/writer_tests6/save_readonly_with_password.py b/sw/qa/uitest/writer_tests6/save_readonly_with_password.py index c61e7d7b0c19..18b0f7d6c54b 100644 --- a/sw/qa/uitest/writer_tests6/save_readonly_with_password.py +++ b/sw/qa/uitest/writer_tests6/save_readonly_with_password.py @@ -32,7 +32,7 @@ class save_readonly_with_password(UITestCase): xPasswordCheckButton.executeAction("CLICK", tuple()) xOpen = xSaveDialog.getChild("open") - with self.ui_test.execute_dialog_through_action(xOpen, "CLICK") as xPasswordDialog: + with self.ui_test.execute_dialog_through_action(xOpen, "CLICK", close_button="") as xPasswordDialog: xReadonly = xPasswordDialog.getChild("readonly") xReadonly.executeAction("CLICK", tuple()) xNewPassword = xPasswordDialog.getChild("newpassroEntry") @@ -40,10 +40,10 @@ class save_readonly_with_password(UITestCase): xConfirmPassword = xPasswordDialog.getChild("confirmropassEntry") xConfirmPassword.executeAction("TYPE", mkPropertyValues({"TEXT": "password"})) - # DOCX confirmation dialog is displayed - xWarnDialog = self.xUITest.getTopFocusWindow() - xSave = xWarnDialog.getChild("save") - self.ui_test.close_dialog_through_button(xSave) + xOk = xPasswordDialog.getChild("ok") + # DOCX confirmation dialog is displayed + with self.ui_test.execute_dialog_through_action(xOk, "CLICK", close_button="save"): + pass with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as document: