Operations tab (Test Object Class designer)
This tab enables you to design the operations your test object class supports. You can:
Define the list of operations supported by this test object class.
You can add or remove operations or select base class operations to override.
For operations that you add or override, you can edit the method signature and define additional information.
Specify the default operation for this test object class (optional).
The information you define in this tab is stored in the XML files in your toolkit support set.
JavaScript function stubs are added to the relevant JavaScript file for each operation that you add or override (unless you use the advanced options to customize the name of the implementation function or file).
Click the Implementation Code button to access the function and implement it to support the operation.
To access | To access the Operations tab:
To access the advanced options, click Advanced Options. |
Important information |
An asterisk next to the name of the tab acts as a reminder that you have not yet visited this tab. |
Relevant tasks | |
See also | The section on implementing support for test object methods in the UFT One Web Add-in Extensibility Developer Guide. |
The Operations tab contains the following areas:
Displays operations you add to the test object class, and some base class operations you can choose to override.
Inherited operations appear in italic font and cannot be modified.
New or overridden operations appear in regular font. You can edit the methods signature in other areas of this tab.
Stored in:Operation elements in the test object configuration XML file.
A JavaScript function stub is added to the relevant JavaScript file for each new or overridden operation. You must implement this function to support the operation.
This area also contains a toolbar with the following buttons:
UI Elements | Description |
---|---|
Add. Adds a new operation to the test object class definition. In addition, a JavaScript function stub is added to the default implementation file. For details on when this takes place, see When changes are applied and saved. Note: If you specified an Implementation file name or an Implementation function name in the advanced options, Extensibility Accelerator does not add the function stub to the JavaScript file, and you must add it manually. | |
Delete. Deletes the selected operation from the test object definition in the test object configuration XML file. The corresponding JavaScript functions are not deleted. If you delete an overriding operation, its signature appears in italic font again. | |
Debug Operation. Opens the Debug Test Object Operation dialog box, enabling you to run and debug the JavaScript code that you designed to implement the test object operation. | |
Override Operation. Creates a new operation that overrides the one inherited from the base class. The operation signature font changes to regular text and the operation details in this tab become editable. In addition, a JavaScript function stub is added to the default implementation file as it is when you add a new operation (for details, see above). |
In this area you define (or view) the name, description, and return type of the operation selected in the operation list area.
In addition, you can select the default operation and access the JavaScript function that implements the operation.
User interface elements are described below:
UI Elements | Description |
---|---|
Name | The test object operation's name. If you rename an operation, and you did not customize the implementation file or function name in the advanced options, the name of the operation's JavaScript implementation function is changed as well. (It is therefore recommended to save this change immediately.) If you rename an overridden operation, its signature appears in italic font again, and a new operation is created with the new name. Note: In this edit box, you can enter only English letters, numeric characters, hyphens, and underscores. The first character must be a letter. Stored in:
|
Description | A description of the operation. This description is displayed in UFT One tooltips. Stored in: Operation\Description element in the test object configuration XML file |
Return type | The type of value that the operation returns. This option displays a list of possible types from which you can choose. The list also includes any enumerations that you define in the Enumerations designer. Stored in: Operation\ReturnValueType\Type element in the test object configuration XML file |
Implementation Code. Opens the relevant JavaScript file to the relevant JavaScript function. | |
Default operation | Indicates whether the operation is the default operation for this test object class. Default: The base class's default operation Stored in: DefaultOperationName attribute of ClassInfo element in the test object configuration XML file |
In this area you define (or view) the arguments of the operation selected in the operation list area.
Stored in: Argument element in the test object configuration XML file
User interface elements are described below:
UI Elements | Description |
---|---|
This toolbar contains Add and Delete buttons, and Up and Down buttons, used to set the order of the arguments. | |
Name | The argument name. Note: In this edit box, you can enter only English letters, numeric characters, hyphens, and underscores. The first character must be a letter. Stored in: Name attribute of the Argument element |
Direction | Specifies whether this argument is an input argument or an output argument. Stored in: Direction attribute of the Argument element |
Type | The type of the argument's value. This option displays a list of possible types from which you can choose. The list also includes any enumerations that you define in the Enumerations designer. Stored in: Type element within the Argument element |
Optional | Specifies whether the argument is optional. If you define optional arguments, the must come after any mandatory arguments that the operation has. Stored in: IsMandatory attribute of the Argument element |
Default | The default value for the argument. Only relevant if the argument is optional. Stored in: DefaultValue attribute of the Argument element |
LOV | Indicates whether UFT One dynamically displays a list of possible values for this argument when editing tests. If you select this option, you must implement a get_list_of_values JavaScript function to return the possible values from the control. By default, UFT One calls this function from the default implementation file defined for this test object class (General tab, advanced options). Stored in: DynamicListOfValues attribute of the Argument element |
Description | A description of the argument. This description is intended for your internal documentation purposes, it is not displayed in UFT One. Stored in: Description attribute of the Argument element |
This area enables you to set advanced options for the operation currently selected in the operation list. If you do not define these options, UFT One uses their default values.
User interface elements are described below:
UI Elements | Description |
---|---|
Icon file | The name of the icon file that you want UFT One to display for this operation in the run session results. Use the Import File button to specify the relevant file. Use the Clear button to clear the edit box. Default: A UFT One default icon Stored in: Operation\IconInfo element in the test object configuration XML file If you select an icon within a |
Import File. Enables you to browse to and select the icon file. You can select an icon from an The file must be located in the project's If the file that you import has the same name as an existing file in this folder, Extensibility Accelerator appends a period (.) and a number to the imported file name (before the file extension). Note: Avoid importing large | |
<icon> | An image of the icon you selected or the default icon. |
Help file | The name of the Use the Import File button to specify the relevant file. Use the Clear button to clear the edit box. Stored in: Operation\HelpInfo element in the test object configuration XML file. |
Import File. Enables you to browse to and select the The file must be located in the project's If the file that you import has the same name as an existing file in this folder, Extensibility Accelerator appends a period (.) and a number to the imported file name (before the file extension). | |
Context ID | The numeric value that indicates the help topic to open within the specified Help file. Stored in: Operation\HelpInfo element in the test object configuration XML file |
Implementation file name | The file that contains the implementation function (optional). You cannot modify this value directly. Use the Import File button to browse to and select the relevant file. Use the Clear button to clear the edit box. The corresponding XML attribute in the toolkit configuration XML file is cleared, but the JavaScript file is not removed from the project. Default: The Default implementation file defined in the General tab Note: If you specify a name in this option, Extensibility Accelerator does not create a stub for the function in the relevant JavaScript file. You must create the function manually. Additionally, the function signature is not updated automatically when the operation signature is modified. Stored in: Method element in the toolkit configuration XML file |
Import File. Enables you to browse to and select a JavaScript file. The file must be located in the project's If the file that you import has the same name as an existing file in this folder, Extensibility Accelerator appends a period (.) and a number to the imported file name (before the | |
Implementation function name | The name of the function that you implement to perform the test object operation on the control. Default: The operation name Note:
Stored in: Method element in the toolkit configuration XML file |