22 import ubuntuuitoolkit
25 from autopilot
import introspection
28 logger = logging.getLogger(__name__)
32 ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
35 def validate_dbus_object(cls, path, state):
36 name = introspection.get_classname_from_path(path)
37 return name
in (b
'TutorialPage', b
'TutorialLeft',
38 b
'TutorialLeftFinish', b
'TutorialRight',
39 b
'TutorialBottom', b
'TutorialBottomFinish')
41 @autopilot.logging.log_action(logger.info)
42 def short_swipe_right(self):
43 self.shown.wait_for(
True)
44 x, y, width, height = self.globalRect
46 stop_x = x + width // 3
47 start_y = stop_y = y + height // 2
48 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
50 @autopilot.logging.log_action(logger.info)
52 self.shown.wait_for(
True)
53 x, y, width, height = self.globalRect
56 start_y = stop_y = y + height // 2
57 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
59 @autopilot.logging.log_action(logger.info)
61 self.shown.wait_for(
True)
62 x, y, width, height = self.globalRect
65 start_x = stop_x = x + width // 2
66 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
68 @autopilot.logging.log_action(logger.info)
70 """Tap the tick button to complete this step."""
71 self.shown.wait_for(
True)
72 button = self.wait_select_single(objectName=
"tick")
73 self.pointing_device.click_object(button)