Structure

XCUIElement.KeyModifierFlags

Flags for keyboard modifiers such as shift, control, option, and command.

Declaration

struct KeyModifierFlags

Overview

Use these modifier flags with the typeKey(_:modifierFlags:) and perform(withKeyModifiers:block:) methods to simulate one or more modifier keys being pressed while an action occurs.

Topics

Modifier Flags

static var command: XCUIElement.KeyModifierFlags

The command key as a key modifier.

static var control: XCUIElement.KeyModifierFlags

The control key as a key modifier.

static var option: XCUIElement.KeyModifierFlags

The option key as a key modifier.

static var shift: XCUIElement.KeyModifierFlags

The shift key as a key modifier.

static var capsLock: XCUIElement.KeyModifierFlags

The caps lock key as a key modifier.

Legacy Modifier Flags

static var alphaShift: XCUIElement.KeyModifierFlags

The caps lock key as a key modifier.

Relationships

Conforms To

See Also

Using Key Modifiers

func typeKey(String, modifierFlags: XCUIElement.KeyModifierFlags)

Types a single key with the specified modifier flags.

struct XCUIKeyboardKey

Constants for use with typeKey(_:modifierFlags:) to represent keys that have no textual equivalent.