Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / uitest / calc_tests / input_window.py
blobeea8b53d950f692c3e1735f2da0cb9e54b045d18
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.framework import UITestCase
9 from uitest.uihelper.common import get_state_as_dict, type_text
10 from libreoffice.uno.propertyvalue import mkPropertyValues
12 from libreoffice.calc.document import get_cell_by_position
14 import time
16 class InputWindowTest(UITestCase):
18 def test_input_window(self):
20 self.ui_test.create_doc_in_start_center("calc")
22 xCalcDoc = self.xUITest.getTopFocusWindow()
23 document = self.ui_test.get_component()
25 xInputWin = xCalcDoc.getChild("sc_input_window")
27 type_text(xInputWin, "test")
28 xInputWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
29 self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "test")
31 self.ui_test.close_doc()
33 # vim: set shiftwidth=4 softtabstop=4 expandtab: