Version 6.1.0.2, tag libreoffice-6.1.0.2
[LibreOffice.git] / sw / qa / uitest / writer_tests / tdf49683.py
blob3d5af6a71f142f9108f6386c7acc8fd6042eeb8f
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 from uitest.framework import UITestCase
11 from libreoffice.uno.propertyvalue import mkPropertyValues
12 from uitest.path import get_srcdir_url
13 from uitest.uihelper.common import get_state_as_dict
14 import time
15 from uitest.debug import sleep
16 from uitest.uihelper.common import select_pos
18 def get_url_for_data_file(file_name):
19 return get_srcdir_url() + "/sw/qa/uitest/writer_tests/data/" + file_name
21 class tdf49683(UITestCase):
23 #tdf 49683
24 def test_open_documentProperties_tdf49683(self):
25 writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf49683.rtf"))
26 self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties")
27 xDialog = self.xUITest.getTopFocusWindow()
28 xTabs = xDialog.getChild("tabcontrol")
29 select_pos(xTabs, "1") #tab description
30 xKeywordsText = xDialog.getChild("keywords")
31 self.assertEqual(get_state_as_dict(xKeywordsText)["Text"], "bhavb")
33 xOkBtn = xDialog.getChild("ok")
34 xOkBtn.executeAction("CLICK", tuple())
36 self.ui_test.close_doc()
38 # vim: set shiftwidth=4 softtabstop=4 expandtab: