Enumeration

XCUIDevice.Button

A physical button on an iOS device.

Declaration

enum Button : Int

Overview

The XCUIDevice.Button.volumeUp and XCUIDevice.Button.volumeDown buttons are not available in the Simulator. Use TARGET_OS_SIMULATOR to check that your test is not running in the Simulator before calling these APIs.

Topics

Device Buttons

case home

The device’s home button.

case volumeUp

The device’s volume up button.

case volumeDown

The device’s volume down button.

See Also

Pressing Device Buttons

func press(XCUIDevice.Button)

Simulates the user pressing a physical button.