Package 

Interface UiSystemActions


  • 
    public interface UiSystemActions
    
                        

    Interface with common actions providing by UiAutomator and executing in the System

    Provides basic actions that can be performed everywhere

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum UiSystemActionType
    • Method Summary

      Modifier and Type Method Description
      Unit openNotification() Opens the notification shade
      Unit openQuickSettings() Opens the Quick Settings shade
      Unit pressDelete() Simulates a short press on the DELETE key
      Unit pressEnter() Simulates a short press on the ENTER key
      Unit pressHome() Simulates a short press on the HOME button
      Unit pressMenu() Simulates a short press on the MENU button
      Unit pressRecentApps() Simulates a short press on the Recent Apps button
      Unit pressSearch() Simulates a short press on the SEARCH button
      Unit click(Integer x, Integer y) Perform a click at arbitrary coordinates specified by the user (click by System)
      Unit drag(Integer startX, Integer startY, Integer endX, Integer endY, Integer steps) Performs a swipe from one coordinate to another coordinate.
      Unit sleep() This method simply presses the power button if the screen is ON else it does nothing if the screen is already OFF.
      Unit wakeUp() This method simulates pressing the power button if the screen is OFF else it does nothing if the screen is already ON.
      abstract UiDeviceInteractionDelegate getView()
      • Methods inherited from class com.kaspersky.components.kautomator.system.UiSystemActions

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • pressEnter

         Unit pressEnter()

        Simulates a short press on the ENTER key

      • pressHome

         Unit pressHome()

        Simulates a short press on the HOME button

      • pressMenu

         Unit pressMenu()

        Simulates a short press on the MENU 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 - coordinate
        y - 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 coordinate
        startY - Y-axis value for the starting coordinate
        endX - X-axis value for the ending coordinate
        endY - Y-axis value for the ending coordinate
        steps - 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.