diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-28 04:03:04 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-29 11:39:58 +0000 |
commit | 462048b3502bdb79cb1171cc58d911666bc7d142 (patch) | |
tree | 37bf5ad4e36f5c16fe74a351a9ab33161cf612b3 /uitest | |
parent | 0fff0211fbdbd23c8e9511f9e352ec65305e4fa2 (diff) |
fix test failure
Change-Id: Ia963b3930b5d2d0ab612619e0165dadd058b3fda
Reviewed-on: https://gerrit.libreoffice.org/29372
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/uitest/test.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index c9c51f5ed2be..2860c0283403 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -22,10 +22,14 @@ class UITest(object): def __init__(self, xUITest, xContext): self._xUITest = xUITest self._xContext = xContext + self._desktop = None def get_desktop(self): - desktop = self._xContext.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", self._xContext) - return desktop + if self._desktop: + return self._desktop + + self._desktop = self._xContext.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", self._xContext) + return self._desktop def get_frames(self): desktop = self.get_desktop() |