Angularjs end to end testing with Protractor

443 views
Skip to first unread message

Rajesh Kumar

unread,
Oct 15, 2014, 12:43:18 PM10/15/14
to ang...@googlegroups.com
I want to be able to test my Angular application with Protractor. I am using use RequireJS and getting this error "Error: Angular could not be found on the page: retries looking for angular exceeded". Is there any work around for this to use protractor for testing my angular app?

Michael Bielski

unread,
Oct 15, 2014, 1:26:14 PM10/15/14
to ang...@googlegroups.com

Ramesh Kumar

unread,
Oct 16, 2014, 12:13:55 AM10/16/14
to ang...@googlegroups.com
Hello Rajesh,

define the "rootElement: 'html'," in your config file

On Wed, Oct 15, 2014 at 10:56 PM, 'Michael Bielski' via AngularJS <ang...@googlegroups.com> wrote:

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Rajesh Kumar

unread,
Oct 16, 2014, 5:01:21 AM10/16/14
to ang...@googlegroups.com
First of all, Thanks for your responses. I am new to protractor and started this couple of days back. Here in my application we are using requirejs that injects angularjs. So in the start page I cant find 'ng-app' as well as the angularjs script references. It loads later with other javascripts during response. I dont want use "browser.ignoreSynchronization = true" because It makes application non-angular and want to use the power of protractor to test angular application. Is there anything we can do with that or there is any alternative testing tool for end to end testing of angularjs framework.

Vysakh S Kumar

unread,
Jul 14, 2015, 7:09:05 PM7/14/15
to ang...@googlegroups.com
Hi Rajesh,

I am also facing similar issue with my app. The only difference from ur scenario is that we have our login page non angular. from the home page onwards its angular and the dev people made it in a way that the use requirejs. Any work around for this. Please let me know the way you fixed this. I am using protractor+jasmine 2.0. 
Reply all
Reply to author
Forward
0 new messages