Version 6.1.0.2, tag libreoffice-6.1.0.2
[LibreOffice.git] / sw / qa / uitest / writer_tests / tdf78068.py
blob145b0bd99b51ac246ce12677ee41581b290c5fdf
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/.
7 from uitest.framework import UITestCase
8 from libreoffice.uno.propertyvalue import mkPropertyValues
9 from uitest.uihelper.common import get_state_as_dict, type_text
11 import time
12 from uitest.debug import sleep
13 from libreoffice.uno.propertyvalue import mkPropertyValues
14 from uitest.uihelper.common import select_pos
16 class tdf78068(UITestCase):
18 def test_tdf78068_format_paragraph_crash(self):
19 self.ui_test.create_doc_in_start_center("writer")
20 document = self.ui_test.get_component()
21 xWriterDoc = self.xUITest.getTopFocusWindow()
22 xWriterEdit = xWriterDoc.getChild("writer_edit")
23 #- add some text
24 type_text(xWriterEdit, "Test")
25 #- go to Format > Paragraph
26 self.ui_test.execute_dialog_through_command(".uno:ParagraphDialog")
27 xDialog = self.xUITest.getTopFocusWindow()
28 xTabs = xDialog.getChild("tabcontrol")
29 select_pos(xTabs, "0")
30 xOK = xDialog.getChild("ok")
31 xOK.executeAction("CLICK", tuple()) #close dialog
33 self.assertEqual(document.Text.String[0:4], "Test")
34 self.ui_test.close_doc()
36 # vim: set shiftwidth=4 softtabstop=4 expandtab: