| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
from uitest.framework import UITestCase |
| 11 |
from libreoffice.uno.propertyvalue import mkPropertyValues |
| 12 |
from uitest.uihelper.common import select_pos |
| 13 |
from uitest.uihelper.common import get_url_for_data_file |
| 14 |
|
| 15 |
class TestTdf141158(UITestCase): |
| 16 |
def test_tdf141158(self): |
| 17 |
|
| 18 |
with self.ui_test.load_file(get_url_for_data_file("TestHiddenHeadersFooters.docx")) as document: |
| 19 |
xWriterDoc = self.xUITest.getTopFocusWindow() |
| 20 |
xWriterEdit = xWriterDoc.getChild("writer_edit") |
| 21 |
|
| 22 |
with self.ui_test.execute_dialog_through_command(".uno:PageStyleName") as xDialog: |
| 23 |
xTabs = xDialog.getChild("tabcontrol") |
| 24 |
select_pos(xTabs, "4") |
| 25 |
|
| 26 |
checkSameLR = xDialog.getChild("checkSameLR-header") |
| 27 |
checkSameLR.executeAction("CLICK",tuple()) |
| 28 |
|
| 29 |
|
| 30 |
xWriterEdit.executeAction("GOTO", mkPropertyValues({"PAGE": "2"})) |
| 31 |
self.xUITest.executeCommand(".uno:JumpToHeader") |
| 32 |
|
| 33 |
xPageSytle = document.getStyleFamilies()[2] |
| 34 |
xHeaderLeftText = xPageSytle[0].HeaderTextLeft.String |
| 35 |
|
| 36 |
|
| 37 |
self.assertEqual("Left Header", xHeaderLeftText) |
| 38 |
|
| 39 |
|