Skip to content

Commit

Permalink
More logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcjansen committed Apr 23, 2014
1 parent 620d42d commit 046038b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tools/screenshots.js
Expand Up @@ -112,17 +112,17 @@ var examples = [
*/
var waitForExtReady = function(p, fun) {
var me = this;

console.log('Waiting for ExtJS to be ready...');

var readyChecker = window.setInterval(function() {

var isReady = p.evaluate(function() {
return Ext && Ext.isReady;
});

if (isReady) {
console.log('ExtJS is ready.');
var url = p.evaluate(function(){
return window.location.href;
});
console.log('ExtJS is ready (' + url + ').');
window.clearInterval(readyChecker);
// call the function that waited to be executed
fun.call(me);
Expand Down Expand Up @@ -166,6 +166,8 @@ var capture = function(exampleUrl, ii, cfg){

page.open(pageUrl, function(){

console.log("Opening " + pageUrl);

waitForExtReady(page, function() {

window.setTimeout(function(){
Expand Down

0 comments on commit 046038b

Please sign in to comment.