2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 from uitest
.framework
import UITestCase
8 import org
.libreoffice
.unotest
12 def get_url_for_data_file(file_name
):
13 return pathlib
.Path(org
.libreoffice
.unotest
.makeCopyFromTDOC(file_name
)).as_uri()
16 # Test for sfx2/source/doc/objserv.cxx.
17 class Test(UITestCase
):
19 def testPdfSigning(self
):
21 impress_doc
= self
.ui_test
.load_file(get_url_for_data_file("pdf-sign.pdf"))
22 doc
= self
.xUITest
.getTopFocusWindow()
24 # Now use File -> Digital signatures -> Digital signatures.
25 self
.ui_test
.execute_dialog_through_command(".uno:Signature")
26 xDialog
= self
.xUITest
.getTopFocusWindow()
27 # Without the accompanying fix in place, this test would have failed with:
28 # uno.com.sun.star.uno.RuntimeException: Could not find child with id: close vcl/source/uitest/uiobject.cxx:452
29 self
.ui_test
.close_dialog_through_button(xDialog
.getChild("close"))
31 self
.ui_test
.close_doc()
34 # vim: set shiftwidth=4 softtabstop=4 expandtab: