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

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

问题描述

在使用 protractor.js 为 Angular 2 应用程序编写测试用例时,如果我想获得 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 所提到的,他是 Protractor 样式指南的贡献者之一,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天全站免登陆