Working with UIWebView objects

Last edited on

Overview

Recording on UIWebView is only supported as a black box.

However, using the API of the UIWebView objects one can nonetheless write code to interact with it.

Here is a rough example (Python):

def main():
    ...

    webView = waitForObject({"type": "UIWebView"})
    jsInnerHtml = NSString.stringWithUTF8String_("document.body.innerHTML")
    content = webView.stringByEvaluatingJavaScriptFromString_(jsInnerHtml)
    test.log("%s" % content)
test.py