Monday, December 15, 2008

Selenese flowControl extensions - advanced support for include template

As my previous post, Selenese flowControl extensions work well on IDE and Core now. However, when guys used another powerful extension 'include', they found flowControl not work in include template steps.

I provide a quick workaround here. Please revise include extension javascript as below:
Selenium.prototype.doInclude = function(locator, paramString) {
    LOG.debug(IncludeCommand.LOG_PREFIX + " Version " + IncludeCommand.VERSION);
    var includeCommand = new IncludeCommand();
    includeCommand.doInclude(locator, paramString);
  
     //Jerry Qian: add flowControl support for include template steps
     try{
       htmlTestRunner.currentTest.gotoLabels  = {};
       htmlTestRunner.currentTest.whileLabels = { ends: {}, whiles: {} };
       htmlTestRunner.currentTest.initialiseLabels();
     }catch(e){}
     //End flowControl
};
Include template steps can use flowControl commands now.

No comments:

Post a Comment