telemetry.core.android_action_runner | index telemetry/core/android_action_runner.py

`# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.`

Modules
`` |  |
logging | time | telemetry.core.util |

Classes
`` |  | __builtin__.object AndroidActionRunner exceptions.Exception(exceptions.BaseException) ActionNotSupported
class ActionNotSupported(exceptions.Exception)
`` |  | Method resolution order: ActionNotSupported exceptions.Exception exceptions.BaseException __builtin__.object Data descriptors defined here: __weakref__ `list of weak references to the object (if defined)` Methods inherited from exceptions.Exception: __init__(...) `x.__init__(...) initializes x; see help(type(x)) for signature` Data and other attributes inherited from exceptions.Exception: __new__ = <built-in method __new__ of type object> `T.__new__(S, ...) -> a new object with type S, a subtype of T` Methods inherited from exceptions.BaseException: __delattr__(...) `x.__delattr__('name') <==> del x.name` __getattribute__(...) `x.__getattribute__('name') <==> x.name` __getitem__(...) `x.__getitem__(y) <==> x[y]` __getslice__(...) `x.__getslice__(i, j) <==> x[i:j] Use of negative indices is not supported.` __reduce__(...) __repr__(...) `x.__repr__() <==> repr(x)` __setattr__(...) `x.__setattr__('name', value) <==> x.name = value` __setstate__(...) __str__(...) `x.__str__() <==> str(x)` __unicode__(...) Data descriptors inherited from exceptions.BaseException: __dict__ args message
class AndroidActionRunner(__builtin__.object)
`` | `Provides an API for interacting with an android device. This makes use of functionality provided by the android input command. None of the gestures here are guaranteed to be performant for telemetry tests and there is no official support for this API. TODO(ariblue): Replace this API with a better implementation for interacting with native components.`
| Methods defined here: InputKeyEvent(self, key) `Send a single key input to the device. Args: key: A key code number or name that will be sent to the device` InputPress(self) `Perform a press input.` InputRoll(self, dx, dy) `Perform a roll input. This sends a simple zero-pressure move event. Args: dx: Change in the x coordinate due to move. dy: Change in the y coordinate due to move.` InputSwipe(self, left_start_coord, top_start_coord, left_end_coord, top_end_coord, duration) `Perform a swipe input. Args: left_start_coord: The horizontal starting coordinate of the gesture top_start_coord: The vertical starting coordinate of the gesture left_end_coord: The horizontal ending coordinate of the gesture top_end_coord: The vertical ending coordinate of the gesture duration: The length of time of the swipe in milliseconds` InputTap(self, x_coord, y_coord) `Perform a tap input at the given coordinates. Args: x_coord: The x coordinate of the tap event. y_coord: The y coordinate of the tap event.` InputText(self, string) `Convert the characters of the string into key events and send to device. Args: string: The string to send to the device.` SmoothScrollBy(self, left_start_coord, top_start_coord, direction, scroll_distance) `Perfrom gesture to scroll down on the android device.` TurnScreenOff(self) `If device screen is on, turn screen off. If the screen is already off, log a warning and return immediately. Raises: Timeout: If the screen is on and device fails to turn screen off.` TurnScreenOn(self) `If device screen is off, turn screen on. If the screen is already on, log a warning and return immediately. Raises: Timeout: If the screen is off and device fails to turn screen on.` UnlockScreen(self) `If device screen is locked, unlocks it. If the device is not locked, log a warning and return immediately. Raises: Timeout: If device fails to unlock screen.` Wait(self, seconds) `Wait for the number of seconds specified. Args: seconds: The number of seconds to wait.` __init__(self, platform_backend) Data descriptors defined here: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`