| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 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") |
| 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 |
|
| 37 |
bottomft = xBorderDlg.getChild("bottommf") |
| 38 |
bottomft.executeAction("UP", tuple()) |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|