Contents

hasHardwareButton(_:)

Determines whether the device supports the button type you provide.

Declaration

func hasHardwareButton(_ button: XCUIDevice.Button) -> Bool

Parameters

  • button:

    The type of physical button on an iOS device to check for.

Return Value

True if the device has this type of button, otherwise False.

Discussion

Use this method to check if the device supports the particular button type you provide.

See Also

Interacting with buttons and the Digital Crown