有没有办法捕获实际的UI Cocoa对象? IE:
let window = app.windows["mainScreen"]
let view = window.webViews["myWebView"]
let webView = view as! WebView
答案 0 :(得分:1)
Unfortunately, no. Xcode UI Testing runs in a separate process from the production application. There is no way to access any UI/Cocoa objects when running through these tests.