The object-driven testing (ODT) functionality is deprecated. Do not use it to create new tests. It will be removed from the product in one of the future releases. As an alternative, you can create custom classes in your scripts. For more information, see Alternatives to the ODT functionality.
To create a new data group
- Right-click the ODT | Data item in the ODT editor or the Data item in the Data editor.
- Select New Item from the context menu.
- TestComplete will create a new object group and name it NewGroup1. You can then rename the group as you wish.
|Names of data groups are used for referring to data groups in scripts and keyword tests. That is why these names must consist of the A..Z, a..z, 0..9 and _ characters only (that is, they must be valid identifiers in the scripting language you use). The data group names are case-sensitive in JScript, C++Script and C#Script scripts, and case-insensitive in VBScript and DelphiScript scripts.|
To rename a group
- In the ODT or Data editor, right-click the object group that you want to rename and select Rename from the context menu, or choose the desired group in the tree view and press F2. TestComplete will activate an in-place editor.
- Enter the desired name for the group.
- To apply changes, press Enter or click somewhere outside of the in-place editor. To cancel changes, press Esc.
To copy and paste a group
You can copy and paste data groups within a project or between different projects. The group is copied along with all of its variables and subgroups.
To copy a group to the clipboard:
To paste a group from the clipboard:
- In the editor select the parent group for the new group, right-click on it and choose Paste from the context menu.
When copying data groups between projects, remember the following:
To change the group’s position
You can change the order in which the objects are "walked" down during testing. You can rearrange the groups that belong to the same level of hierarchy. Rearranging the objects structure, filtering and disabling objects are three different ways to modify the execution flow of an object-driven test. To move a data group:
- Right-click the desired group name in the editor and choose Move Up or Move Down from the context menu to move the group in the corresponding direction.
To delete a group
- In the ODT or Data editor, right-click the group you want to delete and select Delete from the context menu.
- TestComplete will display a message box asking you if you want to delete the selected group. Click OK to delete the group, or Cancel to cancel the deletion.
|Note:||When you delete a group, all variables that belong to this group are also deleted.|
How to Create, Rename and Delete Classes