Use of Selenium for AngularJS based Web Applications

試著忘記壹切 提交于 2019-12-03 08:20:23

Protractor combines powerful tools and technologies such as NodeJS, Selenium, webDriver, Jasmine, Cucumber and Mocha. Has a bunch of customizations from Selenium to easily create tests for AngularJS applications. Speeds up your testing as it avoids the need for a lot of “sleeps” and “waits” in your tests, as it optimizes sleep and wait times. Allows tests to be organized based on Jasmine, thus allowing you to write both unit and functional tests on Jasmine. It runs on real browsers and headless browsers...

You can find all these information here => http://www.thoughtworks.com/insights/blog/testing-angularjs-apps-protractor.

Protractor also provides you to wait for scope changes using protractor.waitForAngular() which I think may or may not be implemented using Selenium. You'll still have to bang around your head in order simulate the same feature using selenium.

My opinion

If you just want to do UI testing and not interested in listening for scope changes or any angular specific events, you can go ahead with selenium. But it's a HUGE advantage using Protractor for e2e tests for Angular.

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