【发布时间】:2019-07-07 01:24:05
【问题描述】:
下面是我返回的代码:
TypeError: 无法读取未定义的属性“then”
verifyElement(locator){
var text = element(by.xpath(locator)).isDisplayed()
text.then(function(result){
console.log("Element is displayed");
return true
},
function(error){
console.log("Element is not displayed");
return false;
}
)}
【问题讨论】:
标签: protractor