Deleting and Locating Objects in QTP

Deleting Objects From the Object Repository

When we remove a step from the test, its corresponding object remains in the object repository.

If you are in the local Object Repository and the object in the step you removed does not occur in any other steps within that action then you can delete the object from the object repository.

or3.JPG

If you are in a shared Object Repository, check that the object does not appear in any other action using the same shared Object Repository before you go to delete the object from the Object Repository.

You can delete objects from the local object repository using the Object Repository window and objects in the shared object repository using the Object Repository Manager.

or1.jpg

How to delete an object from the local Object Repository:

  1. In the repository window, select the object you want to delete.
  2. Click on the Delete button or select Edit-Delete button.
  3. Click on Yes to confirm that you want to delete that object. The object is deleted from the object repository.
How to delete an object from the shared object repository:
  1. Go to the Object Repository Manager; select the object you want to delete.
  2. Click on the Delete button or select Edit-Delete button.
  3. Click on Yes to confirm that you want to delete that object. The object is deleted from the object repository.

or2.jpg

Size of the Object Repository after deleting the object.

Locating Objects

We can search the objects in the Object Repository in many ways. We can search the object according to its type, for example you can point to an object in your application to automatically highlight that same object in your Object Repository or you can search for a specific edit box. You can select an object in your object repository and highlight it in your application to check which object it is. For local objects (and shared objects in an editable shared object repository when using the Object Repository Manager), you can also replace a specific property value with other property values. For example, you can replace the property value userName with username.



p4.jpg


References

automationrepository.com
qtpsudhakar.com
scribd.com

Up Next
    Ebook Download
    View all
    Learn
    View all