Hey Lee - I encountered two common problems with running phantomjs as test runner/ selenium browser:
1. phantomjs doesn't implement all ES5 features. most notable would be ".bind" if you are using ,bind in your code (and we had a lot of it) then phantomjs "out of the box" would fail to handle it. you need to load an ES5 shim with your web page ( can be injected in the testing environment, or with feature detection) and then it would work 2. phantomjs "default" browser size is **very** small, so elements are missing from the view (actually scrolling can reach them, but you don't scroll in automated testing) . The fix: you should set the browser size attribute to a modern large screen size. lots of "missing" elements would turn up Hope this helps!! On Friday, May 16, 2014 12:16:06 AM UTC+3, Lee Rosenberg wrote: > > We have a number of third party js add-ons. We tried to remove the > ui-bootstrap one, but same result. I'm guessing we may need to go through > a long process of elimination to find out if one of those is the culprit. > > Thanks for the reply, this was helpful. > > On Thursday, May 15, 2014 11:48:19 AM UTC-7, Edgars Zagorskis wrote: >> >> 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 th comere). 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
