按钮无法点击 - UIAutomation

时间:2015-03-18 10:40:09

标签: javascript ios xcode ios-ui-automation

我正在尝试创建自动登录过程(登录)的脚本。但是,当我运行脚本时,它表示无法点击'。以下是我到目前为止所写的内容:

var target = UIATarget.localTarget();
var app = target.frontMostApp();
var appWindow = app.mainWindow();
var settingsButton = appWindow.buttons()["CloseVector"];
var settingsView = app.mainWindow().staticTexts()["Settings"]

UIALogger.logStart("Sign in test")


settingsButton.tap(); 
target.delay(1); 

if (settingsView.isValid())
{
    UIALogger.logPass("Correct View");
}
else
{
    UIALogger.logFail("Wrong View");
}

0 个答案:

没有答案