| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
from uitest.framework import UITestCase |
| 10 |
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file |
| 11 |
|
| 12 |
class tdf135636(UITestCase): |
| 13 |
|
| 14 |
def test_tdf135636(self): |
| 15 |
|
| 16 |
with self.ui_test.load_file(get_url_for_data_file("tdf135636.odt")) as document: |
| 17 |
|
| 18 |
self.assertEqual(document.CurrentController.PageCount, 2) |
| 19 |
|
| 20 |
xPageBreak = self.ui_test.wait_until_child_is_available('PageBreak') |
| 21 |
with self.ui_test.execute_dialog_through_action(xPageBreak, "EDIT") as xDialog: |
| 22 |
|
| 23 |
|
| 24 |
xBreak = xDialog.getChild("break") |
| 25 |
self.assertEqual("true", get_state_as_dict(xBreak)["Selected"]) |
| 26 |
|
| 27 |
xBreak.executeAction("CLICK", tuple()) |
| 28 |
|
| 29 |
self.assertEqual("false", get_state_as_dict(xBreak)["Selected"]) |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
self.assertEqual(document.CurrentController.PageCount, 1) |
| 35 |
|
| 36 |
self.xUITest.executeCommand(".uno:Undo") |
| 37 |
|
| 38 |
self.assertEqual(document.CurrentController.PageCount, 2) |
| 39 |
|
| 40 |
|