Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Sunday 3 July 2022

Action Modes

ActionModes are used to steer the object. They define how the value in the Value field should be applied for XTestStepValues in order to steer the control.

The ActionModes available to an XTestStepValue depend on the InterFaceType of the referenced XModule.

ActionModes perform reading or input operations on  a control. Reading operations read the property that is defined for a control. Input operations modify the defined property during test execution.

ActionModes for reading operations:

  1. WaitOn
  2. Select
  3. Verify
  4. Buffer
  5. Constraint

ActionModes for input operations:

  1. Input
  2. Insert

WaitOn

The WaitOn interrupts the execution of the TestCase until the indicated property has the specified value.  The system waits until the control value matches the value specified in the value column or until the contol has adopted the specified property. 

The wait time is defined by the Settings --- > Synchronization Timeout during Waiton. 

Example - Here the Restart button only becomes active when the progress bar reaches 100%


In this example the system waits until the value of the control Progressbar has reached 100%. The Restart button is clicked as soon as this value is reached. 


Buffer -

If inputvalues are needed more than once, they can be buffered using the ActionMode Buffer.

Values or control properties can be saved to a global variable buffer and read out at any point of the test execution.

Any existing or temporarily saved buffer values can be accessed via the Settings dialog at Settings-->Engine in the Buffer sections or on Commander window Tools menu --> Buffer. 

To Buffer a value in the settings dialog, a Buffer name and a Buffer value are required.

NOTE - Use Buffer in messages to save values.
Later, you can use these values as input or for verifications. Make sure to assign meaningful names to your buffer values, so you can find them again.


Example - In this example the value Automation Type is set as buffer name. 


NOTE - The value for the control Make is taken from the application and copied to the settings dialog as a buffer value for the buffer Automation Type.

Constraint -

The Acitionmode Constraint limits the search for  a superordinate node. You can limit the search until it renderss a single element.

NOTE -Use Constraint to restrict the search for a parent node.

If more than one element is found, you can also limit the number of results to only one element by entering #<n> in the superordinate node.

Example - In the following table a row, which has the attribute First name including the value Julia and the attribute Last name including the value Jones, is Searched for in the table. In the row which contains these values, the engine should verify whether the attribute Date of Birth including the value 9/26/1977.

Example - In the table, the second row with attribute First name including the value Peter and the attribute Last name including the value Smith, is searched for. The Value #2 has to be entered for selecting the row. in this row, the engine should verify whether the attribute Date of birth has the value 1/3/1901.

Select

The ActionMode Select allows you to select specified nodes. The required node must have a unique name.

Example - Selecting and verifying the Yearly Amount.

In the table row Yearly Amount is selected. Then the system should verify whether the last cell of this row includes the value 1.207,56.


Verify

The ActionMode Verify allows values and control properties in test objects to be verified. Control properties are verified Value column of an XTestStepValue.

The target node must be specifically defined for this ActionMode to be executed. If no control property has been specified, the default property of the control is verified instead.

NOTE - The defined values are case-sensitive. The entire string is precisely verified. Regular Expressions can be used.

NOTE - You use this ActionMode to verify whether the value in a message matches the value in the Scenario. You can use literal and regular expressions.

Example - Verifies whether the value Truck over 1t(payload) is selected in the drop-down menu Type of Vehicle in the Tosca HTML sample application.


Input

The ActionMode Input can be used to transfer values to the test object. This can, for example, include the input of values into an Editbox, Clicking buttons or selecting a ComboBox, etc. 

If a ValueRange is specified in the ModuleAttribute of the linked XTestSTepValue, these values are provided for selection in the drop-down menu of the XTestStepValue. In addition, any user-specific values can be entered. 

Multi-line text is inputted via a forced line break using the key combination "Shift+Enter". The drop down menu must be converted into an edit box to be able to enter a multi-line value in a drop down menu. For this purpose, the key combination Ctrl+Shift+T must be applied to the selected XTestStepValue.

Example - In this example, Values are entered into the input fields of the TOSCA Sample application.

Insert  

The ActionMode Insert allows you to create objects in non-visual, non UI, interface environments.

Example - Adding a new entry to an XML file

In the following example, The ActionMode inset is used to write the new entry My new product to the XML file Products.