因此,.sleep函数一直存在问题,似乎跳过了睡眠功能,原因是我需要使用用户名和密码(弹出窗口)手动登录,并且在手动输入后,我希望该程序继续。
基本上很简单:
describe('Personal information', function() {
var EC = protractor.ExpectedConditions;
this.timeout(50000);
it('enter email', function(done) {
browser.sleep(10000).then(function() {
console.log('waited 10 seconds');
});
browser.wait(EC.presenceOf(piPage.enterEmail('[email protected]')), 5000);
//enterEmail = element(by.id('email'));
});
});
基本上,我想等待10秒钟,然后与此同时,它应该查找元素是否已显示。提示一经显示,便继续输入电子邮件等代码。但是此刻此代码即将运行,并且永不休眠。
async function
: