1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3# Unity Autopilot Test Suite
4# Copyright (C) 2014 Canonical
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
16# You should have received a copy of the GNU General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
25from autopilot import introspection
28logger = 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)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list