-
- All Implemented Interfaces:
-
com.kaspersky.kaspresso.device.exploit.Exploit
public final class ExploitImpl implements Exploit
The implementation of the Exploit interface.
-
-
Constructor Summary
Constructors Constructor Description ExploitImpl(Activities activities, UiDevice uiDevice, AdbServer adbServer)
-
Method Summary
Modifier and Type Method Description Unitrotate()Toggles the orientation of the device. UnitsetOrientation(Exploit.DeviceOrientation deviceOrientation)Sets the specific Exploit.DeviceOrientation of the device via shell. UnitsetAutoRotationEnabled(Boolean enabled)Sets the device's auto-rotation, whether it enabled or not, via shell. UnitpressBack(Boolean failTestIfAppUnderTestClosed)Presses back button on the device. BooleanpressHome()Presses home button on the device. -
-
Constructor Detail
-
ExploitImpl
ExploitImpl(Activities activities, UiDevice uiDevice, AdbServer adbServer)
-
-
Method Detail
-
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.
-
-
-
-