/** Author: Daniel Hofstetter (http://cakebaker.42dh.com) Based on the format on http://wallsoft.blogspot.com/2007/03/selenium-ide-format-for-cakephp.html */ /** * Parse source and update TestCase. Throw an exception if any error occurs. * * @param testCase TestCase to update * @param source The source to parse */ function parse(testCase, source) { } /** * Format TestCase and return the source. * * @param testCase TestCase to format * @param name The name of the test case, if any. It may be used to embed title into the source. */ function format(testCase, name) { var result = ''; return result; } function ucwords(str) { return str.replace(/\b\w/gi, function(c,i,s) { return c.toUpperCase(); }); } /** * Format an array of commands to the snippet of source. * Used to copy the source into the clipboard. * * @param The array of commands to sort. */ function formatCommands(commands) { var result = ''; for (var i = 0; i < commands.length; i++) { var command = commands[i]; if (command.type == 'command') { if (command.value !== "") { result += '\t\t$this->' + command.command + '(\'' + command.target + '\',\'' + command.value + '\');\n'; } else { result += '\t\t$this->' + command.command + '(\'' + command.target + '\');\n'; } } } return result; } /* * Optional: The customizable option that can be used in format/parse functions. */ //options = {nameOfTheOption: 'The Default Value'} /* * Optional: XUL XML String for the UI of the options dialog */ //configForm = ''