Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
正如标题所说,我想通过 UIAutomation 控制台在 UIWebView 中执行一些 javascript。这可以做到吗?我假设它应该是可能的,但我找不到任何文档或任何与它如何完成相关的东西。
我不认为那是可能的。UIAWebView不会像那样公开评估方法UIWebView。但是,您可以单击一个链接:target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["Say Hello"].tap();刚刚尝试使用 Instruments 录制脚本,看看有什么可能。
UIAWebView
UIWebView
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["Say Hello"].tap();