使用量角器的Angular 2 e2e:by.model不起作用 [英] Angular 2 e2e using protractor: by.model not working

查看:89
本文介绍了使用量角器的Angular 2 e2e:by.model不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在针对Angular 2应用程序使用protractor.js编写测试用例的同时,如果我想获取element(by.model("xyz.test")),则它总是给出失败,提示未定义angular.

While writing test cases using protractor.js for Angular 2 application , if I want to get element(by.model("xyz.test")) its always giving failure saying angular is not defined.

您知道如何解决此问题吗?

Any idea how to fix this issue?

推荐答案

正如@Carmen Popoviciu(是量角器样式指南的贡献者之一)所提到的那样,by.model和by.binding尚未与Protractor一起使用,并且角度2:

As mentioned by @Carmen Popoviciu, who is one of the contributors to the Protractor style guide, by.model and by.binding are not yet working with Protractor and Angular 2:

请记住,当前并非所有定位器策略都受支持 用于ng2应用.像by.model()或by.binding()之类的东西不起作用 刚刚呢检查量角器变更日志中是否有新版本"

"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

这篇关于使用量角器的Angular 2 e2e:by.model不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆