Debian Codegraph @

sw/qa/uitest/writer_tests6/tdf131041_page_header_border.py

raw symbols SCIP
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
2 #
3 # This file is part of the LibreOffice project.
4 #
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 #
9
10 from uitest.framework import UITestCase
11 from uitest.uihelper.common import select_pos, get_state_as_dict
12
13 class tdf131041(UITestCase):
14
15 def test_run(self):
16 with self.ui_test.create_doc_in_start_center("writer"):
17
18 with self.ui_test.execute_dialog_through_command(".uno:PageDialog") as xDialog:
19 tabcontrol = xDialog.getChild("tabcontrol")
20 select_pos(tabcontrol, "4") #header
21
22 xHeaderOn = xDialog.getChild("checkHeaderOn")
23 xMoreBtn = xDialog.getChild("buttonMore")
24
25 self.assertEqual(get_state_as_dict(xHeaderOn)["Selected"], "false")
26 self.assertEqual(get_state_as_dict(xMoreBtn)["Enabled"], "false")
27
28 xHeaderOn.executeAction("CLICK", tuple())
29
30 self.assertEqual(get_state_as_dict(xHeaderOn)["Selected"], "true")
31 self.assertEqual(get_state_as_dict(xMoreBtn)["Enabled"], "true")
32
33 with self.ui_test.execute_dialog_through_action(xMoreBtn, "CLICK") as xBorderDlg:
34
35
36 #modify any property
37 bottomft = xBorderDlg.getChild("bottommf")
38 bottomft.executeAction("UP", tuple())
39
40 #it would crash here
41
42
43
44 # vim: set shiftwidth=4 softtabstop=4 expandtab: