Version 6.1.0.2, tag libreoffice-6.1.0.2
[LibreOffice.git] / sw / qa / uitest / writer_tests / asianPhoneticGuide.py
blob88ae6853e5b9fb0cbd4bf38b3c7e8dbf107c3bf1
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
10 import time
11 from uitest.debug import sleep
12 from uitest.uihelper.common import select_pos
14 class asianPhoneticGuide(UITestCase):
16 def test_asian_phonetic_guide(self):
17 self.ui_test.create_doc_in_start_center("writer")
18 document = self.ui_test.get_component()
19 xWriterDoc = self.xUITest.getTopFocusWindow()
20 xWriterEdit = xWriterDoc.getChild("writer_edit")
22 self.ui_test.execute_modeless_dialog_through_command(".uno:RubyDialog")
23 xDialog = self.xUITest.getTopFocusWindow()
25 xLeft1ED = xDialog.getChild("Left1ED")
26 xRight1ED = xDialog.getChild("Right1ED")
27 xadjustlb = xDialog.getChild("adjustlb")
28 xpositionlb = xDialog.getChild("positionlb")
29 xstylelb = xDialog.getChild("stylelb")
31 xLeft1ED.executeAction("TYPE", mkPropertyValues({"TEXT":"a"}))
32 xRight1ED.executeAction("TYPE", mkPropertyValues({"TEXT":"w"}))
33 props = {"TEXT": "Right"}
34 actionProps = mkPropertyValues(props)
35 xadjustlb.executeAction("SELECT", actionProps)
36 props2 = {"TEXT": "Right"}
37 actionProps2 = mkPropertyValues(props2)
38 xpositionlb.executeAction("SELECT", actionProps2)
39 props3 = {"TEXT": "Quotation"}
40 actionProps3 = mkPropertyValues(props3)
41 xstylelb.executeAction("SELECT", actionProps3)
43 xApplyBtn = xDialog.getChild("apply")
44 xApplyBtn.executeAction("CLICK", tuple())
46 xCloseBtn = xDialog.getChild("close")
47 self.ui_test.close_dialog_through_button(xCloseBtn)
49 self.assertEqual(document.Text.String[0:1], "a")
50 self.ui_test.close_doc()
51 # vim: set shiftwidth=4 softtabstop=4 expandtab: