To record your own workflows for your own purpose, click on the “Record”- button in the upper toolbar of the studio. By clicking this button, you will open another dialog in which you can choose what kind of recording you want to start.
In this dialog you have several options:
- Web: Recording workflows in web-applications
- Desktop: Recording workflows in desktop-applications (not yet supported)
- Mobile: Recording workflows in desktop-application (not yet supported)
To start recording in web-applications, choose the option “web” in the opened dialog.
- Agents selection: Here you can see the connected agents and its respective capabilities. You can then add them to the recording using the + button.
- Name: The name of the agent selected for recording is displayed here.
- Browser: Here you need to specify which browser should be started. Supported right now are Chrome, Firefox, Edge and Internet Explorer.
- Supported browsers:
- Google Chrome
- Mozilla Firefox
- Microsoft Edge
- Internet Explorer
- Supported browsers:
- Enable popup-blocker: Activate or deactivate popup blocking in the recording.
- URL: The address where the test should begin. You can choose both local or web addresses.
- Role: You can assign a role to the agent here. If you do not specify a role, a role is created automatically.
- Cookies: Here you can pass cookies to the browser which are fed in at startup. The input takes place in the format “CookieName1 CookieValue1; CookieName2 CookieValue2; … CookieNameN CookieValueN”
- Full screen: Here you can select whether the browser should be started in full screen mode.
- Width: If you do not want to start in full screen mode, you can define the width of the browser here.
- Height: If the browser is not to be started in full screen, the height of the browser can be defined here.
By confirming your options, the chosen browser will be started with the URL that you entered in the dialog and you can start recording. TWS will now recognize your input in this browser and create its respective activity in real-time and add it to the workflow you’re currently working on.
To stop recording you can either just close your browser or click the button “stop recording” in the studio.
The validation is needed to effectively test web applications, so you can check for example whether your web application has accepted input from users correctly or whether your web shop calculates the prices of a shopping cart correctly.
In this case, the TWS offers you the validation activity. This activity can check during the execution of a workflow whether predefined values or values recorded during a recording match those of the execution. If this match does not exist, the Studio will display an error message in the test results after the workflow or validation activity has been executed.
Validation during recording¶
In order to validate elements during recording, the recording must be started. As soon as the recording is started, a toolbar appears in the opened browser at the top edge, where you have the option to activate the validation mode - as soon as this is activated, no more regular activities are recorded, but the content of the selected element is read out and saved in a validation module for later validation.
The validation activity is generated in real time during recording and inserted at the current position in the workflow. To exit validation mode, select the same option again at the top of the browser and continue recording.
InnerText: Only the real text of the element is considered and no possibly occurring code behind this text
Right now, we only support the “inner text” property.
Note: Edge/Internet Explorer browser(s) doesn’t support case sensitive validation of text while performing validation text is validated within incase sensitive and marked validate HTML activity status as success with a warning in the test result window.
The hover mode is used to control elements of sub-menus whose upper element is only extended when the mouse interacts with it. An example of an HTML or Web element that requires this hover mode for both recording and later execution are drop-down menus.
The elements of the drop-down menu are only displayed when you move the mouse over the top element - this is exactly what the hover activity does.
To switch to hover mode, start the recording and then (just like in validation mode) select hover mode in the browser in the TWS toolbar and activate it.
If the hover mode is activated, TWS will not register the next click as a simple click, but a hover movement - i.e. a mouse movement. As soon as you have executed a hover movement, TWS automatically switches back to normal recording mode and you can interact regularly with elements within the element, such as a drop-down menu.
Manual configuration of hover activities¶
For manual configuration, the identification value and identification type (either XPath + path or the respective ID) of the element to be controlled are required.
HTTP basic authentication¶
HTTP authentication is a method by which the user of a web browser can authenticate himself as a user to the web server or web application in order to be authorized for further access.
TWS allows you to handle these dialogs with two activities - either as a starting point of a test run within the “Start Browser Activity” or during a test as part of the “Click On Activity”. Valid user data is required to handle the dialog - this can be configured in the properties of the respective activity, in addition to an input delay in seconds. After this input delay has expired, the data is entered and confirmed and the test can be continued.
Please note that due to the W3C standard for Web Drivers, your input into the basic-authentication dialog cannot be automatically recorded - in order to be able to create an executable test with a basic authentication dialog, you must proceed as follows:
- Start the recording of a workflow as usual.
- Handle the basic authentication dialog manually.
- Continue recording.
- After finishing the recording, configure the respective activity with the necessary data for the dialog in its properties.
The workflow can then be executed normally.
On Linux, the basic authentication relies on xdotool, which comes preinstalled with some distributions. Should the basic authentication fail on Linux, the presence of xdotool should be checked.