angularjs - PhantomJS and Karma, Selector [ng\:model="query.name"] did not match any elements -
when executing karma runner using phantomjs browser following error produced:
*selector [ng\:model="query.name"] did not match elements*.
when executing chrome working expected. here's line should matched:
`<input size='' style='width:3em;' ng-model="query.name" ng-change=changequery() ng-focus=focus($index) ng-blur=losefocus($index)>`
karma.conf:
module.exports = function(config) { config.set({ basepath: '../..', frameworks: ['ng-scenario'], plugins : [ 'karma-ng-scenario', 'karma-chrome-launcher', 'karma-phantomjs-launcher', 'karma-junit-reporter' ], files: [ 'test/webapp/app/e2e/*.js' ], exclude: [ ], proxies : { '/': 'http://localhost:19880' }, reporters: ['progress', 'junit'], port: 9876, colors: true, loglevel: config.log_info, autowatch: false, browsers: [ 'chrome', 'phantomjs'], capturetimeout: 60000, singlerun: false });
- nodejs version: v0.10.17
- karma version: 0.10.2
- phantomjs version: 1.9
the root cause of failure phantomjs built old version of javascript missing "bind" implementation (why phantomjs doesn't have function.prototype.bind)
the controller logic using currying, bind method, , caused page render incorrectly. found out when exporting rendered page phantomjs browser.
i removed bind method calls controller code , end2end test(s) passing as expected.
i apologize information have provided issue, impossible deduct problem cause.
Comments
Post a Comment