-
public interface UiSystemActionsInterface with common actions providing by UiAutomator and executing in the System
Provides basic actions that can be performed everywhere
-
-
Method Summary
Modifier and Type Method Description UnitopenNotification()Opens the notification shade UnitopenQuickSettings()Opens the Quick Settings shade UnitpressDelete()Simulates a short press on the DELETE key UnitpressEnter()Simulates a short press on the ENTER key UnitpressHome()Simulates a short press on the HOME button UnitpressMenu()Simulates a short press on the MENU button UnitpressRecentApps()Simulates a short press on the Recent Apps button UnitpressSearch()Simulates a short press on the SEARCH button Unitclick(Integer x, Integer y)Perform a click at arbitrary coordinates specified by the user (click by System) Unitdrag(Integer startX, Integer startY, Integer endX, Integer endY, Integer steps)Performs a swipe from one coordinate to another coordinate. Unitsleep()This method simply presses the power button if the screen is ON else it does nothing if the screen is already OFF. UnitwakeUp()This method simulates pressing the power button if the screen is OFF else it does nothing if the screen is already ON. abstract UiDeviceInteractionDelegategetView()-
-
Method Detail
-
openNotification
Unit openNotification()
Opens the notification shade
-
openQuickSettings
Unit openQuickSettings()
Opens the Quick Settings shade
-
pressDelete
Unit pressDelete()
Simulates a short press on the DELETE key
-
pressEnter
Unit pressEnter()
Simulates a short press on the ENTER key
-
pressRecentApps
Unit pressRecentApps()
Simulates a short press on the Recent Apps button
-
pressSearch
Unit pressSearch()
Simulates a short press on the SEARCH button
-
click
Unit click(Integer x, Integer y)
Perform a click at arbitrary coordinates specified by the user (click by System)
- Parameters:
x- coordinatey- coordinate
-
drag
Unit drag(Integer startX, Integer startY, Integer endX, Integer endY, Integer steps)
Performs a swipe from one coordinate to another coordinate. You can control the smoothness and speed of the swipe by specifying the number of steps. Each step execution is throttled to 5 milliseconds per step, so for a 100 steps, the swipe will take around 0.5 seconds to complete.
- Parameters:
startX- X-axis value for the starting coordinatestartY- Y-axis value for the starting coordinateendX- X-axis value for the ending coordinateendY- Y-axis value for the ending coordinatesteps- is the number of steps for the swipe action
-
sleep
Unit sleep()
This method simply presses the power button if the screen is ON else it does nothing if the screen is already OFF.
-
wakeUp
Unit wakeUp()
This method simulates pressing the power button if the screen is OFF else it does nothing if the screen is already ON.
-
getView
abstract UiDeviceInteractionDelegate getView()
-
-
-
-