Package 

Interface Exploit


  • 
    public interface Exploit
    
                        

    The interface for exploitation.

    Required: Started AdbServer 1. Download a file "kaspresso/artifacts/adbserver-desktop.jar" 2. Start AdbServer => input in cmd "java jar path_to_file/adbserver-desktop.jar" Methods demanding to use AdbServer in the default implementation of this interface are marked. But nobody can't deprecate you to write implementation that doesn't require AdbServer.

    • Nested Class Summary

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

      Modifier and Type Method Description
      abstract Unit rotate() Toggles the orientation of the device.
      abstract Unit setOrientation(Exploit.DeviceOrientation deviceOrientation) Sets the specific DeviceOrientation of the device.
      abstract Unit setAutoRotationEnabled(Boolean enabled) Sets the device's auto-rotation, whether it is enabled or not, via shell.
      abstract Unit pressBack(Boolean failTestIfAppUnderTestClosed) Presses back button on the device.
      abstract Boolean pressHome() Presses home button on the device.
      • Methods inherited from class com.kaspersky.kaspresso.device.exploit.Exploit

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

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

      • rotate

         abstract Unit rotate()

        Toggles the orientation of the device.

      • setOrientation

         abstract Unit setOrientation(Exploit.DeviceOrientation deviceOrientation)

        Sets the specific DeviceOrientation of the device.

        Required Permissions: INTERNET.

        Parameters:
        deviceOrientation - the desired orientation of the device.
      • setAutoRotationEnabled

         abstract Unit setAutoRotationEnabled(Boolean enabled)

        Sets the device's auto-rotation, whether it is enabled or not, via shell.

        Required Permissions: INTERNET.

        Parameters:
        enabled - the desired auto-rotation state.
      • pressBack

         abstract Unit pressBack(Boolean failTestIfAppUnderTestClosed)

        Presses back button on the device.

        Parameters:
        failTestIfAppUnderTestClosed - if set to true, an exception will be thrown when Espresso navigates outside the application or process under test.