diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-05-01 11:43:29 +0300 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-18 17:02:05 +0200 |
commit | 56f61df183da7a5061296fb5eaf1690a8ba8a3ef (patch) | |
tree | c6281b0738e5799a289fac591454e23f2616332b | |
parent | 02764051e96192bac3411a60f78bb7a6fc68a040 (diff) |
uitest: better support for multiple events
We might want to do different things for different events
Change-Id: Ib71832208c8929b76800c025b9eed001526731ba
-rw-r--r-- | uitest/helper.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/uitest/helper.py b/uitest/helper.py index ecf23807ab92..2d771e108ac3 100644 --- a/uitest/helper.py +++ b/uitest/helper.py @@ -32,6 +32,7 @@ class EventListener(XDocumentEventListener,unohelper.Base): "com.sun.star.frame.GlobalEventBroadcaster", xContext) self.xContext = xContext self.executed = False + self.eventExecuted = [] if isinstance(eventNames, str): self.eventNames = [eventNames] elif isinstance(eventNames, list): @@ -48,6 +49,10 @@ class EventListener(XDocumentEventListener,unohelper.Base): print(str(event.EventName)) if event.EventName in self.eventNames: self.executed = True + self.eventExecuted.append(event.EventName) + + def hasExecuted(self, eventName): + return eventName in self.eventExecuted def disposing(event): pass |