XCUIElement获取底层元素对象,如WebView

时间:2016-02-12 19:16:21

标签: xcode7 xcode-ui-testing

有没有办法捕获实际的UI Cocoa对象? IE:

let window = app.windows["mainScreen"]
let view = window.webViews["myWebView"]
let webView = view as! WebView

1 个答案:

答案 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.