Kaydet (Commit) f260194a authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: add some work to load several documents

Change-Id: If9bf0e88fd7b223f10c31e3b0ed357da2bc4f9b0
üst 997c7acc
......@@ -23,6 +23,27 @@ class UITest(object):
self._xUITest = xUITest
self._xContext = xContext
def get_desktop(self):
desktop = self._xContext.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", self._xContext)
return desktop
def get_frames(self):
desktop = self.get_desktop()
frames = desktop.getFrames()
return frames
def load_file(self, url):
desktop = self.get_desktop()
with EventListener(self._xContext, "OnLoad") as event:
component = desktop.loadComponentFromURL(url, "_default", 0, tuple())
time_ = 0
while time_ < 30:
if event.executed:
return component
def execute_dialog_through_command(self, command):
with EventListener(self._xContext, "DialogExecute") as event:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment