...
Create the custom action in VBScript by taking into consideration the custom action rules.
For example, if you want to create custom action as "CustomSetValueInEditBox" for WebEdit, create a new vbs file with name CustomWebEdit. This action will set the specified value into the webedit so method will look similar to below.
...
- On the Develop tab, click Objects.
- Click the Custom button in the left pane.
- Right-click the object class in the left pane against which the custom action is to be mapped.
- Select "New" from the context menu.
An Add New File Name pop up appears. - Enter the name of the vbs file that the custom action is coded into.
- Click OK.
- Select the custom class just created in the left pane and then click New Custom Action in the right pane.
- Enter the following details in the custom vbs file:
- Action Name
- : Name of action as displayed in Qualitia.
- Description: Describe what the custom action does
- Function Name:The exact name of the UFT function.
Add the required parameters in the Properties section.
Info Do not set the object parameter as given in the custom class. The user only needs to add the parameters in the same sequence as given in the vbs file excluding the Object Parameter. Then select the argument data type as String, Integer, or Array. Also, check if the parameter is Mandatory. Deselecting Mandatory option indicates that the parameter is not mandatory, that is zero length string data is allowed.
- Once all the parameters are added, click OK.
The above steps map the custom action to Qualitia. - On the Setting menu, click Configuration Settings > Execution.
- In Custom Action Repository Path, enter the path of the vbs file in which you have written the code for custom action followed by a ";" semi-colon.
For example: D:\CustomLib\CustomWebEdit.vbs;