summaryrefslogtreecommitdiff
path: root/sw/qa/uitest/writer_tests6/tdf131041.py
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/uitest/writer_tests6/tdf131041.py')
-rw-r--r--sw/qa/uitest/writer_tests6/tdf131041.py34
1 files changed, 15 insertions, 19 deletions
diff --git a/sw/qa/uitest/writer_tests6/tdf131041.py b/sw/qa/uitest/writer_tests6/tdf131041.py
index aa0df0aa1d10..8ba2fc2fabbb 100644
--- a/sw/qa/uitest/writer_tests6/tdf131041.py
+++ b/sw/qa/uitest/writer_tests6/tdf131041.py
@@ -13,34 +13,30 @@ class tdf131041(UITestCase):
self.ui_test.create_doc_in_start_center("writer")
document = self.ui_test.get_component()
- self.ui_test.execute_dialog_through_command(".uno:PageDialog")
- xDialog = self.xUITest.getTopFocusWindow()
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, 4) #header
+ with self.ui_test.execute_dialog_through_command_guarded(".uno:PageDialog") as xDialog:
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, 4) #header
- xHeaderOn = xDialog.getChild("checkHeaderOn")
- xMoreBtn = xDialog.getChild("buttonMore")
+ xHeaderOn = xDialog.getChild("checkHeaderOn")
+ xMoreBtn = xDialog.getChild("buttonMore")
- self.assertEqual(get_state_as_dict(xHeaderOn)["Selected"], "false")
- self.assertEqual(get_state_as_dict(xMoreBtn)["Enabled"], "false")
+ self.assertEqual(get_state_as_dict(xHeaderOn)["Selected"], "false")
+ self.assertEqual(get_state_as_dict(xMoreBtn)["Enabled"], "false")
- xHeaderOn.executeAction("CLICK", tuple())
+ xHeaderOn.executeAction("CLICK", tuple())
- self.assertEqual(get_state_as_dict(xHeaderOn)["Selected"], "true")
- self.assertEqual(get_state_as_dict(xMoreBtn)["Enabled"], "true")
+ self.assertEqual(get_state_as_dict(xHeaderOn)["Selected"], "true")
+ self.assertEqual(get_state_as_dict(xMoreBtn)["Enabled"], "true")
- with self.ui_test.execute_dialog_through_action(xMoreBtn, "CLICK") as xBorderDlg:
+ with self.ui_test.execute_dialog_through_action(xMoreBtn, "CLICK") as xBorderDlg:
- #modify any property
- bottomft = xBorderDlg.getChild("bottommf")
- bottomft.executeAction("UP", tuple())
+ #modify any property
+ bottomft = xBorderDlg.getChild("bottommf")
+ bottomft.executeAction("UP", tuple())
- #it would crash here
+ #it would crash here
- xDialog = self.xUITest.getTopFocusWindow()
- okBtn = xDialog.getChild("ok")
- self.ui_test.close_dialog_through_button(okBtn)
self.ui_test.close_doc()