Get the style color and number just once
[LibreOffice.git] / sw / qa / uitest / writer_tests6 / tdf131041.py
blob1de344888a6b6576aea545294ced7c1ee6aaeb07
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
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/.
10 from uitest.framework import UITestCase
11 from uitest.uihelper.common import select_pos, get_state_as_dict
13 class tdf131041(UITestCase):
15 def test_run(self):
16 with self.ui_test.create_doc_in_start_center("writer"):
18 with self.ui_test.execute_dialog_through_command(".uno:PageDialog") as xDialog:
19 tabcontrol = xDialog.getChild("tabcontrol")
20 select_pos(tabcontrol, "4") #header
22 xHeaderOn = xDialog.getChild("checkHeaderOn")
23 xMoreBtn = xDialog.getChild("buttonMore")
25 self.assertEqual(get_state_as_dict(xHeaderOn)["Selected"], "false")
26 self.assertEqual(get_state_as_dict(xMoreBtn)["Enabled"], "false")
28 xHeaderOn.executeAction("CLICK", tuple())
30 self.assertEqual(get_state_as_dict(xHeaderOn)["Selected"], "true")
31 self.assertEqual(get_state_as_dict(xMoreBtn)["Enabled"], "true")
33 with self.ui_test.execute_dialog_through_action(xMoreBtn, "CLICK") as xBorderDlg:
36 #modify any property
37 bottomft = xBorderDlg.getChild("bottommf")
38 bottomft.executeAction("UP", tuple())
40 #it would crash here
44 # vim: set shiftwidth=4 softtabstop=4 expandtab: