summaryrefslogtreecommitdiff
path: root/sw/qa/uitest/writer_tests7
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-06-29 15:34:16 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-06-29 21:50:27 +0200
commitb58fe9414f6303ed55f4c82bd697bd2ca35347d7 (patch)
tree044a0e1fa002ac4a3da07e4b74a27f5ba7b07aa6 /sw/qa/uitest/writer_tests7
parent4809d28e6db709008b9cd6bd45bc3a0ad6a43a59 (diff)
uitest: simplify code with execute_dialog_through_action
Change-Id: I84cee48c7f7b450e00fed4f70b6c0c41e03dea9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118116 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/uitest/writer_tests7')
-rw-r--r--sw/qa/uitest/writer_tests7/tdf119661.py6
-rw-r--r--sw/qa/uitest/writer_tests7/tdf90401.py5
2 files changed, 3 insertions, 8 deletions
diff --git a/sw/qa/uitest/writer_tests7/tdf119661.py b/sw/qa/uitest/writer_tests7/tdf119661.py
index e1464b962c99..a761bb88ceab 100644
--- a/sw/qa/uitest/writer_tests7/tdf119661.py
+++ b/sw/qa/uitest/writer_tests7/tdf119661.py
@@ -27,12 +27,10 @@ class tdf119661(UITestCase):
xLink.executeAction("CLICK", tuple())
xOpenBtn = xOpenDialog.getChild("open")
- xOpenBtn.executeAction("CLICK", tuple())
#Confirmation dialog is displayed
- xWarnDialog = self.xUITest.getTopFocusWindow()
- xOK = xWarnDialog.getChild("ok")
- self.ui_test.close_dialog_through_button(xOK)
+ with self.ui_test.execute_dialog_through_action(xOpenBtn, 'CLICK'):
+ pass
with self.ui_test.execute_dialog_through_command(".uno:LinkDialog", close_button="close") as xDialog:
diff --git a/sw/qa/uitest/writer_tests7/tdf90401.py b/sw/qa/uitest/writer_tests7/tdf90401.py
index 40b9b483153f..98a9064b6304 100644
--- a/sw/qa/uitest/writer_tests7/tdf90401.py
+++ b/sw/qa/uitest/writer_tests7/tdf90401.py
@@ -30,7 +30,7 @@ class tdf90401(UITestCase):
# enable remove personal info security option
- with self.ui_test.execute_dialog_through_command('.uno:OptionsTreeDialog', close_button="") as xDialog:
+ with self.ui_test.execute_dialog_through_command('.uno:OptionsTreeDialog') as xDialog:
xPages = xDialog.getChild('pages')
xGenEntry = xPages.getChild('0')
xSecurityPage = xGenEntry.getChild('6')
@@ -46,9 +46,6 @@ class tdf90401(UITestCase):
# event DialogClosed after closing
xOkBtn.executeAction('CLICK', tuple())
- xOKBtn = xDialog.getChild('ok')
- self.ui_test.close_dialog_through_button(xOKBtn)
-
# save and reload the document to remove personal info
with TemporaryDirectory() as tempdir: