0
運行在iPad上用Instrumentstool記錄UI的操作testscripts的UI自動化Testscripts獨立只能如果iPad的定位是相同的,因爲它是通過記錄。deviceorientation
在水平模式i具有訪問我要小費這樣的按鈕:
UIATarger.localTarget().frontMostApp().mainWindow().buttons()[0].tap();
倒掛(水平「反向」)是這樣的:
UIATarger.localTarget().frontMostApp().mainWindow().buttons()[1].tap();
的按鈕命令已經改變。現在我正在尋找一個很好的解決方案來訪問那個按鈕而不檢查設備的方向。
要搜索按鈕名稱是不可能的,因爲它沒有名稱。在中,logTreeElement()代表名稱爲null。
我想過檢查方向,然後將正確的ID,但那不是真的很聰明......