Scenario test in AngularJs


I am using AngularJS for my web application. To do the e2e routing scenario testing, based on tutorial, I need to do something like browser().navigateTo('../../app/index.html'). However, I am using cshtml as my main view, which is blocked from direct server browsing. So I cannot do something like browser().navigateTo('../../app/index.cshtml').

I would like the browser to navigate to the application root instead of specific file. I do something like browser().navigateTo('../../'). However, I get following error "TypeError: Cannot call method '$browser' of undefined". I think that is due to "ng-app" in index.cshtml is not included. Is there some easy way to solve this?

By : zhenbzha


I would consider possibly putting the test runner in a virtual directory off of your main testing site.

By : rodmjay

This video can help you solving your question :)
By: admin