I am testing a Java applet with QTP.I am adding the objects in the applet to my object repository.I am able to create an action that works with the objects in Objects Repository.My doubt is if an object is moved from the current location to some other.Will my script work?If not how to overcome this issue?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Anytime ordinal position values for x,y coordinates or indexes are used in a test script there is a high probability of failure. Not only will the test throw a false positive if the object is moved, but also consider different screen resolutons, and different devices. In general ordinal values for objects is generallly not a good practice in robust test automation. A better solution would be to use object properties as suggested by Kanishka.
depend on what you have in mandatory and assistive properties. also if you are not using any of these and you are using Ordinal identifier such as Index there are chances that the script will fail.