Selenium Plugin Legacy - Converters


From file …


… to configuration.selenium

Category-name : configuration.selenium

What ?

This converter creates a configuration.selenium resource which can be used to launch a Selenium Server for selenium RC tests.

CONVERT {resourceToConvert<Res:file>} TO configuration.selenium (configuration.selenium) AS {converted<Res:configuration.selenium>}

> Input :

  • {resourceToConvert<Res:file>} : The name (in the context) of the resource which references a configuration file for a Selenium sever (‘.properties’).

> Output :

  • {converted<Res:configuration.selenium>} : The name of the converted resource (configuration.selenium type resource).

Example :

LOAD selenium/selenium-conf.properties AS selenium-conf.file

CONVERT selenium-conf.file TO configuration.selenium AS selenium-conf



… to script.html.selenium

Category-name : script

What ?

This script converter will convert a file type resource to a script.html.selenium type resource.

CONVERT {resourceToConvert<Res:file>} TO script.html.selenium (script) USING {conf<Res:file>} AS {converted<Res:script.html.selenium>}

> Input :

  • {resourceToConvert<Res:file>} : The name (in the context) of the resource which references the root directory containing the sources needed for a selenium test suite at the format “selenese”.

  • {conf<Res:file>} : The name of the resource which references a configuration file which can contain two keys :

It can be defined via an inline instruction.

> Output :

  • {converted<Res:script.html.selenium>} : The name of the converted resource (script.html.selenium type resource).

Example :

LOAD path/to/rootDirectory AS directory

CONVERT directory TO script.html.selenium (script) USING (mainpath:relative/path/to/suite.html) AS selenese.bundle



From script.java to script.java.selenium1

Category-name : script

What?

This script converter create a selenium test resource (script.java.selenium1 type resource) which can be used by the ‘execute’ ‘script.java.selenium1’ command from a script.java resource.

CONVERT {resourceToConvert<Res:script.java>} TO script.java.selenium1`(:converter-name:`script) USING {conf<Res:file>} AS {converted<Res:script.java.selenium1>}

> Input :

  • {resourceToConvert<Res:script.java>} : The name (in the context) of the resource which references a java bundle which contains the source code, the compiled code and the resources of a selenium1 test suite.

  • {conf<Res:file>} (optional) : The name of the resource which references a configuration file which can contain only one key :

    • mainClass : The qualified name of the main java class. The configuration must be supplied as a text file with one line containing the qualified name. If you give more, the last read line becomes the main class name. This parameter may be used if you have only one selenium test suite. On the other hand, if your selenium test bundle contains several test suite sharing helper code resources and dependencies, you may omit the main class name and rather give that parameter in the configuration of your various execute commands. It can be defined via an inline instruction.

> Output :

  • {converted<Res:script.java.selenium1>} : The name of the converted resource (script.java.selenium1 type resource).

Example :

LOAD selenium AS seleniumTestSource

CONVERT seleniumTestSource TO script.java (compile) AS seleniumTestCompiled

CONVERT seleniumTestCompiled TO script.java.selenium1 (script) USING $(org.squashtest.Selenium1JUnit3) AS seleniumTest