Testing AngularJS with Selenium

后端 未结 12 757
梦毁少年i
梦毁少年i 2020-11-27 04:56

I have a SPA application on stack ASP MVC + AngularJS and I\'d like to test the UI. For now I\'m trying Selenium with PhantomJS and WebKit drivers.

This is a sample

12条回答
  •  醉话见心
    2020-11-27 05:47

    If you don't want to make the entire switch to Protractor but you do want to wait for Angular I recommend using Paul Hammants ngWebDriver (Java). It's based on protractor but you don't have to make the switch.

    I fixed the problem by writing an actions class in which I waited for Angular (using ngWebDriver's waitForAngularRequestsToFinish()) before carrying out the actions (click, fill, check etc.).

    For a code snippet see my answer to this question

提交回复
热议问题