[Libreoffice-commits] core.git: uitest/uitest

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Feb 27 09:45:05 UTC 2017


 uitest/uitest/test.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c9326537872e1f6b90a418ee2d7c7ffcf27b9c43
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Feb 27 04:05:59 2017 +0100

    uitest: use the new dialog method in the python code
    
    Change-Id: I252310bc453450236b5b7de0ef292cfbba7ea64a
    Reviewed-on: https://gerrit.libreoffice.org/34670
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index 3122329..2de8b31 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -66,7 +66,7 @@ class UITest(object):
 
     def execute_dialog_through_command(self, command):
         with EventListener(self._xContext, "DialogExecute") as event:
-            self._xUITest.executeCommand(command)
+            self._xUITest.executeDialog(command)
             time_ = 0
             while time_ < 30:
                 if event.executed:
@@ -138,13 +138,13 @@ class UITest(object):
 
     def close_doc(self):
         with EventListener(self._xContext, ["DialogExecute", "OnViewClosed"] ) as event:
-            self._xUITest.executeCommand(".uno:CloseDoc")
+            self._xUITest.executeDialog(".uno:CloseDoc")
             time_ = 0
             while time_ < 30:
                 if event.hasExecuted("DialogExecute"):
                     xCloseDlg = self._xUITest.getTopFocusWindow()
                     xNoBtn = xCloseDlg.getChild("discard")
-                    self.close_dialog_through_button(xNoBtn);
+                    xNoBtn.executeAction("CLICK", tuple())
                     return
                 elif event.hasExecuted("OnViewClosed"):
                     return


More information about the Libreoffice-commits mailing list