1

When I write test script (Descriptive programming) in QTP/UFT, I find difficult to figure out & choose unique properties for objects identification, now here I want to know that is there any way to figure out the best unique property for the same kind of objects.

2
  • You should add an example if possible of an object with his properties.
    – lauda
    Jul 16, 2017 at 9:06
  • I am asking in a general way most of the time I manage but it takes a lot of time. Jul 16, 2017 at 14:44

1 Answer 1

1

Sometimes there is not a single property which will uniquely identify the object and we have to use a number of properties to identify the one we are looking for. In my experience, you keep adding properties/attributes in your descriptive code until you find the object. I always start with "html id"or "name" if there is one available as most of the times that is unique. If it is not I would always ask the developers if there are any specific reasons to do. Sometimes it takes them just a few seconds to add such unique property so it is always better to ask them! To achieve uniqueness, I have used combination of "micclass", "innertext", "html tag", "visible" and "title" properties but there may be more you can use depending on your project.

I hope it is helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.