Moving Objects in the Object Repository

You can copy, paste, and move objects in the local object repository using the Object Repository window, and copy, paste, and move objects both within a shared object repository and between shared object repositories using the Object Repository Manager. However, you cannot modify the root node of an object repository. You can also copy objects from a shared object repository to the local object repository to modify them locally.

You can move an object to a different location within an object repository by dragging it up or down the tree and dropping it at the required location. You can copy an object to a different location within an object repository by pressing the Ctrl key while dragging the object and dropping it at the required location in the tree.

When you drag an object, by default, any child objects are also moved or copied with it. If you want to move or copy an object without its child objects, you can drag it using the right mouse button. When you drop the object at the required location, you can choose whether to drop it with or without its children.

You can cut, copy, and paste objects within an object repository using the corresponding toolbar buttons or in the Edit menu. In the Object Repository Manager, you can also cut, copy, and paste objects between shared object repositories. When you cut, copy, and paste objects, the operation is performed also on the child objects of the selected object, if any.

In the Object Repository window, when you copy, paste, and move objects from a shared object repository associated with the component, the objects are copied, pasted, or moved to the local object repository of the component.

You cannot copy, paste, or move objects that have unmapped repository parameters from a shared object repository to the local object repository. If you copy, paste, or move an object from a shared object repository to the local object repository and the object or one of its parent objects are parameterized using one or more repository parameters, the repository parameter values are converted when you copy, paste, or move the object. For example, if the repository parameter is mapped to a local parameter, the property is parameterized using a local parameter. If the value is a constant value, the property receives the same constant value.

In the Object Repository Manager, you can copy an object from one shared object repository to another by opening both shared object repositories and dragging the object from one window and dropping it at the required location in the other window. You can move an object from one shared object repository to another by opening both shared object repositories pressing the Ctrl key while dragging the object from one window and dropping it at the required location in the other window. Note that moving an object removes it from one shared object repository and adds it to another.

Note: You can use the Edit > Undo and Edit > Redo options or Undo and Redo buttons to cancel or repeat your changes. When you save the object repository, you cannot undo and redo operations that were performed before the save operation.

When copying, pasting, or moving objects, consider the following:

  • If you change the object hierarchy, ensure that the new hierarchy is a valid recorded hierarchy.
  • If you paste or move an object to a different hierarchical level, you can choose whether to copy all objects up to the shared parent object (in the message displayed when you perform such an operation).
  • If you move an object to its immediate parent, QuickTest creates a copy of the object (renamed with an incremental suffix) and pastes it as a sibling of the original object.
  • If you cut or copy an object, and then paste it on its parent object, QuickTest creates copy of the object (renamed with an incremental suffix) and inserts it at the same level as the original object.
  • You cannot move an object to any of its descendants.
  • You cannot copy or move an object to be a child of a bottom-level object (an object that cannot contain a child object) in the object hierarchy.

Note: WinMenu objects can be either parent or bottom-level objects.

No comments: