我正在尝试测试单击按钮后是否出现元素。但是 sublime 通过显示红线无法识别任何函数,例如 toBeTrue()、toBe(true)。以下是代码:
updAccDtlBtn.click().then(function() {
expect(p.browser.getCurrentUrl()).to.eventually.equal('http://localhost:3000/myAccount');
//A green field notifying success will be displayed
var succUpdSpan = p.browser.element(p.By.cssContainingText('col-sm-offset-4','Account Details Successfully Updated'));
expect(succUpdSpan.isPresent()).toBeTrue();
});