Added xdebug
, xtree
, xobject
and xnoid
commands
#192
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds four new commands to help with Xcode UI tests. All commands are working with Objective-C and Swift code.
xdebug
This command is a shortcut for
XCUIApplication().debugDescription
(or[[[XCUIApplication alloc] init] debugDescription]
for Objective-C). It accepts an optional argument which an instance of theXCUIElement
type which will be used instead ofXCUIApplication
. In addition, for the Swift variant, all\n
characters are normalized to new line characters.xtree
Prints tree of
XCUIElement
objects of theXCUIApplication
object (it can be configured by an optional argument like in thexdebug
command). Output is similar toXCUIApplication().debugDescription
but it doesn't contain by default "unnecessary" information like frame, traits or pointer value. That additional information can be turned on by using options--frame
,--trait
and--pointer
.Example output:
xnoid
This command can be used to find potential views with missing identifiers. It prints all objects which have set label but doesn't have the identifier. Output is similar to
xtree
command but in addition, theStatusBar
is not presented (which can be changed with--status-bar
option).Example output:
xobject
Prints detailed information about the
XCUIElement
object.Example output: