Micro Focus QTP (UFT) Forums
Identifying using mandatory property - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Identifying using mandatory property (/Thread-Identifying-using-mandatory-property)



Identifying using mandatory property - nattu82 - 10-03-2012

Hi ,
I have an object in the my OR and i perform action on it by using the following code,
Code:
browser("Welcome to").Page("Welcome to_2").Frame("Frame").WebList("profile").Select("2")
. This works perfectly.
The above weblist has mandatory properties like html tag and name

However if I want to replace the Weblist name with its mandatory properties in the following format
Code:
browser("Welcome to").Page("Welcome to_2").Frame("Frame").WebList("name:= ccc1","html tag:= ttt1").Select("2")
There are multiple weblists in the page (namely ("name:= ccc1","name:= ccc2"),("name:= ccc3")," and I want to loop in these required objects and select item from the list
The above code throws an error , Why is this happening ,


The error is Cannot identify the object "[Weblist]" (of calss Weblist). Verify that the Objects Properties Match an object currently in the application.


RE: Identifying using mandatory property - Ankesh - 10-04-2012

see if you can use index property.
When there are multiple fields with identical properties, Index/Location property does the job.

Regards,
Ankesh


RE: Identifying using mandatory property - krr - 10-04-2012

Yes Ordinal identifier will do the job. that is Index,location.