gpt4 book ai didi

Angular 2 e2e 使用 Protractor : by. 模型不工作

转载 作者:太空狗 更新时间:2023-10-29 17:45:47 26 4
gpt4 key购买 nike

在使用 protractor.js 为 Angular 2 应用程序编写测试用例时,如果我想获取 element(by.model("xyz.test")),它总是会失败,说 angular is not defined .

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

最佳答案

正如 Protractor 风格指南的贡献者之一@Carmen Popoviciu 所提到的,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

关于Angular 2 e2e 使用 Protractor : by. 模型不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38077812/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com