How to do Automation when you dont have unique properties.
I am trying to automate one application using QTP.
1) Application is running on 3 different URL's.
2) Application is in Java.
3) Objects property we are getting are HTML Id and Index.
HTML Id is getting change every time application is run.
Index property is changing when application runs on different URL. Like Index for Object1 in URL1 is 3 while same object on URL2 has index as 4.
Can you please help me How can I automate this application ?
Post some sample HTML source code
Have you tried using a regular expression for the ID or perhaps using the Visual Relation Identifier?
QTP Tutorials & Interview Questions: Visual Relation Identifier
Approach development and have them provide identifiers you can use. Testability should be a project requirement. Some frameworks like extjs use dynamic ids so you can't use those. But may be able to use xpath(requires qtp 11).
If I were you then I would refrain to put my hand in the fire until Dev team ready to come up with unique property ointment as suggested in the post above.
I'm wondering if the new Insight Feature would be useful in cases where QA cannot get unique identifiers. There are products such as eggplant(I have not tried it) and Tevron's CitraTest that recognize objects using bitmaps, mapping and OCR.
I prefer everyone else's comments above about working with Dev more than this idea am mentioning.