summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-21 17:14:54 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-22 01:17:44 +0100
commit92654aafae9b5d7187b117da5b4b60f533d8a536 (patch)
tree0b9141cd1f44e1e7a4ff89422e4acb1a9164014c /uitest
parent8c286ace812898690244556d2c2a348e5174a2ad (diff)
uitest: add method to get first component
Note that this method should be improved to allow selecting a specific component. However for now this works will all tests that start only one document. Change-Id: Iaba47b3dc5996abbfc3fca54dfefa48df5a603d8
Diffstat (limited to 'uitest')
-rw-r--r--uitest/uitest/test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index 552071fd8699..d68a67edd78a 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -41,6 +41,13 @@ class UITest(object):
frames = desktop.getFrames()
return frames
+ def get_component(self):
+ desktop = self.get_desktop()
+ components = desktop.getComponents()
+ for component in components:
+ if component is not None:
+ return component
+
def load_file(self, url):
desktop = self.get_desktop()
with EventListener(self._xContext, "OnLoad") as event: