summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uitest/writer_tests/start.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/uitest/writer_tests/start.py b/uitest/writer_tests/start.py
index 83b5ad2643c6..a9b722adc4cb 100644
--- a/uitest/writer_tests/start.py
+++ b/uitest/writer_tests/start.py
@@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-from uitest_helper import UITest
+from uitest_helper import UITest, get_state_as_dict
from helper import mkPropertyValues
@@ -58,4 +58,25 @@ def type_text(xContext):
ui_test.close_doc()
+def goto_first_page(xContext):
+ xUITest = xContext.ServiceManager.createInstanceWithContext(
+ "org.libreoffice.uitest.UITest", xContext)
+
+ ui_test = UITest(xUITest, xContext)
+
+ ui_test.create_doc_in_start_center("writer")
+
+ xWriterDoc = xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ state = get_state_as_dict(xWriterEdit)
+ print(state)
+ while state["CurrentPage"] is "1":
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
+ state = get_state_as_dict(xWriterEdit)
+
+ time.sleep(2)
+
+ ui_test.close_doc()
+
# vim:set shiftwidth=4 softtabstop=4 expandtab: */