我有下面的脚本,我按下按钮,想要等待一秒钟,看看Facebook登录是否通过外部webview进行。我遇到的问题是delay()似乎挂起,或者没有被调用。我永远不会去“这里”:
var target = UIATarget.localTarget();
var app = target.frontMostApp();
var window = app.mainWindow();
var testFBLogin = true;
var loginView = window.scrollViews()[0];
if (testFBLogin) {
UIALogger.logMessage("Logging in via Facebook");
loginView.buttons()["Login Using Facebook"].tap();
target.delay(1);
UIALogger.logMessage("Here");
} else {
UIALogger.logMessage("Logging in via Email");
}