perform(withKeyModifiers:block:)
Executes a block of code while holding a combination keystroke.
Declaration
class func perform(withKeyModifiers flags: XCUIElement.KeyModifierFlags, block: () -> Void)Parameters
- flags:
A set of modifier flags (Keymodifierflags) to use while executing the block.
- block:
The block to execute.
Discussion
This method sets and holds the keyboard modifiers you provide while you call methods to click on, drag from, or type into elements in the block.