加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

Angular 2 e2e使用量角器:by.model不工作

发布时间:2020-12-17 17:50:44 所属栏目:安全 来源:网络整理
导读:在使用protractor.js为Angular 2应用程序编写测试用例时,如果我想获取元素(by.model(“xyz.test”)),它总是给出失败,说明角度没有定义. 知道如何解决这个问题吗? 解决方法 正如@Carmen Popoviciu所说,他是Protractor风格指南的贡献者之一,by.model和by.bind
在使用protractor.js为Angular 2应用程序编写测试用例时,如果我想获取元素(by.model(“xyz.test”)),它总是给出失败,说明角度没有定义.

知道如何解决这个问题吗?

解决方法

正如@Carmen Popoviciu所说,他是Protractor风格指南的贡献者之一,by.model和by.binding尚未与Protractor和Angular 2合作:

“Keep in mind that currently not all locator strategies are supported
for ng2 apps. Things like by.model() or by.binding() are not working
just yet. Check the Protractor changelog for new releases”

https://github.com/CarmenPopoviciu/angular2-go-protractor

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读