activities
latest
false
UiPath logo, featuring letters U and I in white

UI Automation activities

Last updated Mar 13, 2026

PressHardwareButton

Presses a hardware button on the connected device

Definition

Namespace: UiPath.MobileAutomation.API.Models

Assembly: UiPath.MobileAutomation.API (in UiPath.MobileAutomation.API.dll)

PressHardwareButton(HardwareButton, MobileOptions.HardwareButtonOptions)

PressHardwareButton(
	HardwareButton button,
	MobileOptions. PressHardwareButtonOptions options = null
)
PressHardwareButton(
	HardwareButton button,
	MobileOptions. PressHardwareButtonOptions options = null
)

button HardwareButton : The button you wan to press. The following options are available:

* `HomeButton`
* `BackButton`
* `SwitchAppButton`
* `HomeButton`
* `BackButton`
* `SwitchAppButton`

options MobileOptions.PressHardwareButtonOptions (Optional) : Specifies the MobileOptions.PressHardwareButtonOptions for the PressHardwareButton action. Default value is null.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated