Just below the XCUIElementQuery
class inside XCTest
there are many constants where the documentation note above it states:
Constants for use with -[XCUIElement typeKey:modifierFlags:],
representing keys that have no textual representation. These comprise
the set of control, function, and modifier keys found on most keyboards.
Apparently, it seems there should be a XCUIElement
method called typeKey:modifierFlags:
, as the note states. However, I can't seem to find this method anywhere in the documentation. I also don't see any method that substitutes this behavior, utilizing the aforementioned constants. Here is a partial list of the constants I'd be interested in using:
let XCUIKeyboardKeyDelete: String
let XCUIKeyboardKeyReturn: String
let XCUIKeyboardKeyTab: String
let XCUIKeyboardKeyCommand: String
Is this code just premature and will likely be completed later, as part of future Xcode 7 releases?
Ultimately, I'd like to be able to type cmd+a
then use XCUIKeyboardKeyDelete
to delete the contents of the given XCUIElement
. If there are good alternatives currently available in Xcode 7 UI Testing, I'd love to learn know.
--> Swift 2.0 beta 4
[XCUIElement typeKey:modifierFlags:]
got removed by accident or something on beta 4. The recorder uses it but it doesn't compile. – Gunpowder