Angular 2 e2e using protractor: by.model not working

╄→尐↘猪︶ㄣ 提交于 2019-12-05 11:55:17

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:

"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

Here's a github issue to follow about this, by.model is mentionned in the comments.

(that's the only open ticket I could find at the minute, if anyone has better)

The answer from @Gabriel Kohen is definitely accurate but I thought I would add another answer with some links to the documentation that actively discourage use of by.model and by.binding

https://github.com/angular/protractor#compatibility

https://github.com/angular/protractor/blob/master/docs/locators.md#locators

At this point it's probably unlikely they will ever be supported.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!