gpt4 book ai didi

javascript - 将 Protractor 用于非 Angular 应用程序有什么好处?

转载 作者:行者123 更新时间:2023-11-29 21:46:39 26 4
gpt4 key购买 nike

我目前正在实现自动化测试,想知道使用 Protractor 自动化非 Angular 应用程序有什么好处。

与只使用webdriverJS相比有什么优势?

最佳答案

protractor 提供一个 convenient and well-designed APIWebDriverJS javascript selenium 绑定(bind)之上的抽象层。它由 Google 开发人员积极开发和维护。

除了browser, by, element, element.all, $ and $$ global syntactic sugar和多个独特的定位器以及添加自定义定位器的简单方法,有一组内置的 Expected Conditionsbrowser.wait() 一起使用,有助于与非 Angular 应用同步。

此外,不要忘记前往 configure your protractor tests 的便捷方式.

此外,还有几个内置的 plugins扩展 Protractor 的内置功能。目前已实现 Accessibility、Timeline、ngHint 和 Console 插件。


换句话说,使用 protractor,您将获得纯 vanilla webdriver 提供的所有内容以及更多。


另见:

关于javascript - 将 Protractor 用于非 Angular 应用程序有什么好处?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30948624/

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