1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
"""Application autopilot helpers."""
7
logger = logging.getLogger(__name__)
10
class AppException(ubuntuuitoolkit.ToolkitException):
12
"""Exception raised when there are problems with the Application."""
15
class TouchApp(object):
17
"""Autopilot helper object for the application."""
19
def __init__(self, app_proxy, test_type):
21
self.test_type = test_type
22
self.main_view = self.app.select_single(MainView)
25
def pointing_device(self):
26
return self.app.pointing_device
29
class MainView(ubuntuuitoolkit.MainView):
31
"""A helper that makes it easy to interact with the mainview"""
33
def __init__(self, *args):
34
super(MainView, self).__init__(*args)
35
self.visible.wait_for(True, 30)
38
return self.select_single('Button', objectName="button")
41
return self.select_single('Label', objectName="label")
b'\\ No newline at end of file'