if ((windmill.runTests == true) || (windmill.xhr.xhrResponse.result.method.split(".")[0] == 'commands')){
try {
//Wait/open needs to not grab the next action immediately
if ((windmill.xhr.xhrResponse.result.method.split(".")[0] == 'waits')){
windmill.controller.stopLoop();
}
if (windmill.xhr.xhrResponse.result.method.indexOf('.') != -1){
//if asserts.assertNotSomething we need to set the result to !result
if(windmill.xhr.xhrResponse.result.method.indexOf('asserts.assertNot') != -1){
var mArray = windmill.xhr.xhrResponse.result.method.split(".");
var m = mArray[1].replace('Not','');
var result = !windmill.controller[mArray[0]][m](windmill.xhr.xhrResponse.result.params);
}
//Normal asserts and waits
else{
var mArray = windmill.xhr.xhrResponse.result.method.split(".");
var result = windmill.controller[mArray[0]][mArray[1]](windmill.xhr.xhrResponse.result.params);
}
}
//Every other action that isn't namespaced
else{
var result = windmill.controller[windmill.xhr.xhrResponse.result.method](windmill.xhr.xhrResponse.result.params);
}
}
catch (error) {
windmill.ui.results.writeResult("There was an error in the "+
windmill.xhr.xhrResponse.result.method+" action. "+error+"");
windmill.ui.results.writeResult("
Action: " + windmill.xhr.xhrResponse.result.method +
"
Parameters: " + fleegix.json.serialize(windmill.xhr.xhrResponse.result.params) +
"
Test Result: " + result + '');
result = false;
//If the option to throw errors is set
if ($('throwDebug').checked == true){
if (console.log){
console.log(error);
}
else { throw(error); }
}
else {
if (!$('toggleBreak').checked) {
windmill.controller.continueLoop();
}
}
}
}