Created
October 1, 2013 06:26
-
-
Save huguogang/6774553 to your computer and use it in GitHub Desktop.
Client side script for SJTXE (Selenium JavaScript Testing eXtension for ExtJS)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Client side utilities for Selenium tests of ExtJS web applications | |
//requires ExtJS and Underscore libraries | |
//SJTXE - Selenium JavaScript Testing eXtension for ExtJS | |
(function(root, Ext) { | |
var root = root || window; | |
var me = root; | |
var Ext = Ext; | |
//private vars | |
var hasAjaxFailure = false; | |
var onAjaxError = function(conn, response, options, eOpts) { | |
hasAjaxFailure = true; | |
}; | |
Ext.onReady(function() { | |
Ext.Ajax.on({ | |
requestexception: onAjaxError | |
}); | |
}); | |
//exposed object | |
var SJTXE = { | |
VERSION: '0.0', | |
hasAjaxFailure: function() {return hasAjaxFailure} | |
}; | |
root.SJTXE = SJTXE; | |
return SJTXE; | |
})(this, Ext); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment