/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* ****************************************************************************** * * ide-extensions.js * * Vivo-specific modifications to ßSelenium IDE (1.0.4). * * As delivered, the HTML formatter writes comments as actual HTML comments, * so they are invisible when the test file is viewed in a browser. * * These modifications will change the options in the HTML formatter, so: * 1) When writing an HTML test file, comments are written as "comment" * commands, where the text of the comment is the target of the command. * 2) When reading an HTML test file, "comment" commands are parsed as * comments, so they can be recognized by the IDE editor. Old-style * comments will also be recognized, for compatibility. * 3) When writing an HTML test file, a CSS stylesheet is embedded in the * heading with styles for the test name and the comments. Class attributes * are inserted in the test name cell and the comment text cell to apply * these styles. * * Tests written using these mods must have access to "user-extensions.js" * when running, either in the IDE or in Selenium RC. That file will define * "comment" as a command that does nothing. * * To install these mods in Selenium IDE: * 1) Start the IDE. * 2) Go the "Options" menu and select "Options..." * 3) Put the path to "user-extensions.js into the * "Selenium core extensions" field. * 4) Put the path to this file "ide-extensions.js" into the * "Selenium IDE extensions" field. * 5) Close the IDE and re-start it. * ****************************************************************************** */ /* * Locate the HTML format object. */ var formatCollection = window.editor.app.formats; var htmlFormat = formatCollection.formats["0"]; /* * Ask the HTML format object to load its formatter. The formatter is * cached on the first load, so changes to the options will remain * in effect. */ htmlFormat.getFormatter(); var formatterOptions = htmlFormat.formatterCache.options; /* * Modify the regular expression that loads commands: * 1) The second column of the table must have a simple "
${name} |