Last active
December 12, 2020 22:44
-
-
Save triangletodd/0083d2892f16584dd487 to your computer and use it in GitHub Desktop.
IOS UIAutomation Debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dumpElementTree() { | |
UIALogger.logStart("Logging element tree ..."); | |
UIATarget.localTarget().logElementTree(); | |
UIALogger.logPass(); | |
} | |
function inspect(obj) { | |
var log = UIALogger; | |
var methods = []; | |
log.logStart("Logging methods for object...") | |
for (var m in obj) { | |
if (typeof obj[m] == "function") { | |
log.logDebug(m); | |
} | |
} | |
log.logPass(); | |
} | |
var target = UIATarget.localTarget(); | |
var app = target.frontMostApp(); | |
var window = app.mainWindow(); | |
var navbar = app.navigationBar(); | |
inspect(navbar); | |
dumpElementTree(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment