summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-05-10 01:26:56 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-18 17:02:15 +0200
commit40804d6179c42bb39ec70f539f51ecf93934814c (patch)
tree06393254ae0ba321472096b5c08679dfaf98b95f /uitest
parent511f6f85d90884f864b5bf42eedb758841f72957 (diff)
uitest: report when a dialog was not executed correctly
Change-Id: Ibe603045b095e020e572bac986d766ac555b0e04
Diffstat (limited to 'uitest')
-rw-r--r--uitest/uitest_helper.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/uitest/uitest_helper.py b/uitest/uitest_helper.py
index 5d5f158566b9..cac4ea127165 100644
--- a/uitest/uitest_helper.py
+++ b/uitest/uitest_helper.py
@@ -9,6 +9,13 @@ import time
from helper import EventListener
+class DialogNotExecutedException(Exception):
+ def __init__(self, command):
+ self.command = command
+
+ def __str__(self):
+ return "Dialog not executed for: " + self.command
+
class UITest(object):
DEFAULT_SLEEP = 0.1
@@ -28,8 +35,7 @@ class UITest(object):
time_ += self.DEFAULT_SLEEP
time.sleep(self.DEFAULT_SLEEP)
- # report a failure here
- print("failure execute modal dialog")
+ raise DialogNotExecutedException(command)
def execute_modeless_dialog_through_command(self, command):
with EventListener(self._xContext, "ModelessDialogVisible") as event:
@@ -42,8 +48,7 @@ class UITest(object):
time_ += self.DEFAULT_SLEEP
time.sleep(self.DEFAULT_SLEEP)
- # report a failure here
- print("failure execute modeless dialog")
+ raise DialogNotExecutedException(command)
def create_doc_in_start_center(self, app):
xStartCenter = self._xUITest.getTopFocusWindow()