LearnBoost / soda

Selenium Node.JS adapter
http://labs.learnboost.com
464 stars 43 forks source link

In rendered jade pages some scripts don't load #59

Open awiss opened 11 years ago

awiss commented 11 years ago

I'm an trying to set up automated testing for a node app using jade as the templating engine. However, when i attempt to open one of the pages the dev console logs jQuery is not defined, because the jQuery script isn't loaded. The network bar shows the scripts are not loaded. Multiple page refreshes also do not solve the issue, along with simply waiting on the page. This issue seems to only arise for a few non-locally hosted scripts. On static pages this issue doesn't arise.

Code: var soda = require('soda') , assert = require('assert');

var browser = soda.createClient({ url: 'http://localhost:8000' ,browser:'googlechrome'

});

browser.on('command', function(cmd, args){ console.log(' \x1b[33m%s\x1b[0m: %s', cmd, args.join(', ')); }); browser .chain .session()

.open('/') .waitForCondition('false',50000) .end(function(err){ browser.testComplete(function(){ console.log('done'); if(err) throw err; }); });