If you are a UFT user you know there are a few ways to add objects to your object repository. In case you aren’t, the object repository is where UFT stores the test objects used to build automated tests which consist of steps created from application objects, for instance web buttons, and the methods applied to those objects such as “Click” for a button.
In the past, there were a few ways to add objects to the object repositories.
- Record a test which added objects to the repository as steps were recorded
- Add the objects 1 at a time
- Learn all the objects on a page at the same time
The first method is pretty good since you get the objects you want as you create your test. But you only get those objects for the steps you record. What if you need more and because those recorded objects are added to the local repository, they can’t be used by other actions.
The second method takes a long time but it does provide control over which objects are selected.
The third is good for getting everything and there are filters so the user can just pull in the edit boxes or buttons but frequently a lot of chaff is gathered with the wheat as all objects are pulled in whether a user needs them or not.
The sniper mode is new in UFT version 14.00 and is a kind of middle ground where the user can collect objects from a selected area of the application under test (AUT). They use a cross-hair icon to select the target area and all the objects in that area are added to the repository.
The good thing is there is a filter so it is possible to just learn the button objects in the selected area of the AUT.
This provides users with one more tool that lets them add selected groups of objects from a discreet area of a page in one step without having to collect every single object on a given page or adding each button and checkbox and drop-down one after another. It is the pleasant compromise between the famine or feast approaches previously available with the tool and ultimately isn’t that what we want? New tools to make our job more efficient? Object Sniper Mode is just such a tool that you can now add to your toolbox.
Have fun and Good Testing!
Senior Technical Engineer