Selenium
The folder TBox Automation Tools->Selenium in the Standard subset contains the following Modules:
These Modules allow you to start Selenium TestCases directly from Tosca Commander.
Supported formats
Tricentis Tosca supports the following formats:
-
NUnit or JUnit 4 TestCases
-
JUnit 5 TestCases
-
DLL and JAR files which contain Selenium 1 (RemoteControl)
-
Selenium 2 (WebDriver) TestCases
Supported test frameworks
Tricentis Tosca uses the following frameworks for your tests:
-
Selenium Java 3.9.1 to execute Selenium JUnit 4 tests
-
Selenium-Jupiter 3.4.0 to execute Selenium JUnit 5 tests
-
NUnit 2.6.4 to execute Selenium C# tests
Prerequisites
To run Selenium tests, you first need to copy the file Tricentis.Automation.AutomationTools.dll from the directory %TBOX_HOME% to the directory that contains your Selenium TestCases.
Start Selenium Server
This Module defines the connection properties for Selenium 1.
It has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Selenium Server Path |
Path to the Selenium server JAR file. Tosca Commander automatically uses the ActionMode Select. |
Selenium Port |
Port for the Selenium server. By default, Tricentis Tosca opens the Selenium server via port 4444. Tosca Commander automatically uses the ActionMode Select. |
In this example, you define the following connection properties:
Start a Selenium server |
Run Selenium Scripts
This Module starts Selenium scripts. After execution, you can view the result in the Loginfo column of the ExecutionEntry.
The Module has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Path |
Path to the DLL or JAR file that contains the TestMethods you want to execute. |
TestClass |
Class from the DLL or JAR file where the TestMethods are located. |
TestMethod |
TestMethods that you want to execute. |
Report Directory |
Location where Tricentis Tosca should store the test results. Tricentis Tosca creates an HTML result file for JUnit and an XML result file for NUnit. You can open these files directly from Tosca Commander via the Details viewer (see chapter "Open files you created during execution"). |
If you want to run all tests within your DLL or JAR file, leave TestClass and TestMethod empty.
This example shows how to run a Selenium script. The TestStep specifies the following:
Run a Selenium script |