3
我玩UIAutomation,我不能引用視圖...UIAutomation得到視圖
這裏是日誌,在視圖中可見:main_view
UIAApplication: name:MyProjectDemo rect:{{0, 0}, {1024, 768}}
UIAWindow: rect:{{0, 0}, {1024, 768}}
UIAElement: name:main_view rect:{{0, 0}, {1024, 768}}
我怎麼能引用它並獲得他們的子視圖?
target = UIATarget.localTarget();
app = target.frontMostApp();
app.logElementTree();
mainWindow = app.mainWindow();
var view = mainWindow.views()["main_view"]; // doesn't work => undefined
var view = mainWindow.views()[0]; // doesn't work => undefined
謝謝!