tdf#104816 sw: if non-section content, let all sections hide.
[LibreOffice.git] / uitest / impress_tests / start.py
blobde7a6ece7247465a99813aef03555b23ed31c6ba
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 from uitest.uihelper.common import get_state_as_dict
10 from libreoffice.uno.propertyvalue import mkPropertyValues
12 from uitest.framework import UITestCase
14 import time
16 class SimpleImpressTest(UITestCase):
17 def test_start_impress(self):
19 self.ui_test.create_doc_in_start_center("impress")
21 xTemplateDlg = self.xUITest.getTopFocusWindow()
22 xCancelBtn = xTemplateDlg.getChild("cancel")
23 self.ui_test.close_dialog_through_button(xCancelBtn)
25 xImpressDoc = self.xUITest.getTopFocusWindow()
27 xEditWin = xImpressDoc.getChild("impress_win")
28 xEditWin.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
30 self.ui_test.close_doc()
32 def test_select_page(self):
34 self.ui_test.create_doc_in_start_center("impress")
36 xTemplateDlg = self.xUITest.getTopFocusWindow()
37 xCancelBtn = xTemplateDlg.getChild("cancel")
38 self.ui_test.close_dialog_through_button(xCancelBtn)
40 xImpressDoc = self.xUITest.getTopFocusWindow()
42 xEditWin = xImpressDoc.getChild("impress_win")
44 xEditWin.executeAction("GOTO", mkPropertyValues({"PAGE": "2"}))
46 self.ui_test.close_doc()
48 def test_select_text(self):
50 self.ui_test.create_doc_in_start_center("impress")
52 xTemplateDlg = self.xUITest.getTopFocusWindow()
53 xCancelBtn = xTemplateDlg.getChild("cancel")
54 self.ui_test.close_dialog_through_button(xCancelBtn)
56 xImpressDoc = self.xUITest.getTopFocusWindow()
58 xEditWin = xImpressDoc.getChild("impress_win")
60 self.ui_test.close_doc()
62 def test_select_object(self):
64 self.ui_test.create_doc_in_start_center("impress")
66 xTemplateDlg = self.xUITest.getTopFocusWindow()
67 xCancelBtn = xTemplateDlg.getChild("cancel")
68 self.ui_test.close_dialog_through_button(xCancelBtn)
70 xImpressDoc = self.xUITest.getTopFocusWindow()
71 print(xImpressDoc.getChildren())
73 xEditWin = xImpressDoc.getChild("impress_win")
75 xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
76 xEditWin.executeAction("DESELECT", tuple())
78 self.ui_test.close_doc()
80 # vim: set shiftwidth=4 softtabstop=4 expandtab: