Package 

Class ExploitImpl

  • All Implemented Interfaces:
    com.kaspersky.kaspresso.device.exploit.Exploit

    
    public final class ExploitImpl
     implements Exploit
                        

    The implementation of the Exploit interface.

    • Method Summary

      Modifier and Type Method Description
      Unit rotate() Toggles the orientation of the device.
      Unit setOrientation(Exploit.DeviceOrientation deviceOrientation) Sets the specific Exploit.DeviceOrientation of the device via shell.
      Unit setAutoRotationEnabled(Boolean enabled) Sets the device's auto-rotation, whether it enabled or not, via shell.
      Unit pressBack(Boolean failTestIfAppUnderTestClosed) Presses back button on the device.
      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
    • Constructor Detail

    • Method Detail

      • rotate

         Unit rotate()

        Toggles the orientation of the device.

      • setOrientation

         Unit setOrientation(Exploit.DeviceOrientation deviceOrientation)

        Sets the specific Exploit.DeviceOrientation of the device via shell. Note: sets auto-rotation to false!

        Required Permissions: INTERNET.

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

         Unit setAutoRotationEnabled(Boolean enabled)

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

        Required Permissions: INTERNET.

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

         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.