I had similar issues (works in browser, fails in phanotmjs) while doing integration tests on a website which used one of popular "twitter bootstrap" adaptations for AngularJS. It just didn't want to work (element wasn't created in time). I solved it by getting rid of 3rd party bootstrap directives and removing jQuery (which also was there). Then tests passed. TL;DR - do you have 3rd party code (directives?) there and have you tried testing without them
> > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.