Selenium Plugin Legacy - Commands


‘execute’ ‘script.html.selenium’

What ?

This command executes HTML format Selenium Suites (“selenese” format).

EXECUTE execute WITH {seleneseTest<Res:script.html.selenium>} ON {webSUT<Tar:http>} USING {conf<Res:file>} AS {result<Res:result.selenium>}

> Input :

  • {seleneseTest<Res:script.html.selenium>} : The name (in the context) of the resource which references the selenium test to execute (script.html.selenium type resource).

  • {webSUT<Tar:http>} : The name in (the context) of the target corresponding to the SUT (http type target).

  • {conf<Res:file>} (optional) : The name of the resource which references a configuration file which can contain two keys separated with comma :

It can be define via an inline instruction. The format is <key>:<value>.

Note : The command needs the two keys (mainpath and browser). The command can retrieve them via the USING clause of the instruction or via script.html.selenium type resource (see the From file to script.html.selenium converter).

Those two configuration keys are optional in each instruction (command and conversion) but each one must be defined in at least one instruction. If a key is defined in the convert instruction and in the command instruction, the key in the command instruction predominates.

> Output :

  • {result<Res:result.selenium>} : The result of the test execution (result.selenium type resource).

Example :

EXECUTE execute WITH seleneseTest ON TargetWeb USING conf-file AS result


‘execute’ ‘script.java.selenium1’

What ?

This command executes selenium 1 tests referenced as script.java.selenium1 resources.

EXECUTE execute WITH {selenium1Tests<Res:script.java.selenium1>} USING {conf<Res:file>} AS {result<Res:result.selenium>}

> Input :

  • {selenium1Tests<Res:script.java.selenium1>} : The name (in the context) of the resource which references the java bundle containing the tests to execute (script.java.selenium1 type resource).

  • {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. It can be defined via an inline instruction. The format is <key>:<value>.

Note : The command needs this key. The command can retrieve it via the USING clause of the instruction or via script.java.selenium1 type resource (See the From script.java to script.java.selenium1 converter). This configuration key is optional in each instruction (command and conversion) but it must be defined in at least one instruction. If the key is defined in the convert instruction and in the command instruction, the key in the command instruction prime.

> Output :

  • {result<Res:result.selenium>} : The result of the test execution.(result.selenium 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.Selenium1JUnit4) AS seleniumTest

EXECUTE execute WITH seleniumTest AS seleniumResult



‘launch’ ‘configuration.selenium’

What ?

To execute a selenium1 test at java format a selenium server can be started. This command launches a Selenium Server instance (formerly SeleniumRC server) following the configuration described by a configuration.selenium resource. This command produces a process type resource which can be used with the cleanup command to kill it.

EXECUTE launch WITH {seleniumServerConfig<Res:configuration.selenium>} AS {seleniumServerProcess<Res:process>}

> Input :

  • {seleniumServerConfig<Res:configuration.selenium>} : The name (in the context) of the resource which references a configuration file permitting to start a Selenium server (configuration.selenium type resource).

> Output :

  • {seleniumServerProcess<Res:process>} : The name (in the context) of the resource which references a processus linked to the Selenium Server (process type resource).

Example :

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

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

EXECUTE launch WITH selenium-rc-conf AS seleniumServer