23 import ubuntuuitoolkit
26 from autopilot
import introspection
29 logger = logging.getLogger(__name__)
33 ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
36 def validate_dbus_object(cls, path, state):
37 name = introspection.get_classname_from_path(path)
38 return name
in (b
'TutorialPage', b
'TutorialLeft',
39 b
'TutorialLeftFinish', b
'TutorialRight',
40 b
'TutorialBottom', b
'TutorialBottomFinish')
42 @autopilot.logging.log_action(logger.info)
43 def short_swipe_right(self):
44 self.shown.wait_for(
True)
45 x, y, width, height = self.globalRect
47 stop_x = x + width // 3
48 start_y = stop_y = y + height // 2
49 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
51 @autopilot.logging.log_action(logger.info)
53 self.shown.wait_for(
True)
54 x, y, width, height = self.globalRect
57 start_y = stop_y = y + height // 2
58 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
60 @autopilot.logging.log_action(logger.info)
62 self.shown.wait_for(
True)
63 x, y, width, height = self.globalRect
66 start_x = stop_x = x + width // 2
67 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
69 @autopilot.logging.log_action(logger.info)
71 """Tap the tick button to complete this step."""
72 self.shown.wait_for(
True)
73 button = self.wait_select_single(objectName=
"tick")
74 self.pointing_device.click_object(button)