05-30-2008, 11:28 PM
so you have problem writing Descriptive Programming... I think the very 1st point of this post on Descriptive Programming and QTP (the one you have mentioned above) covers it all...and yes it is exhaustive also for the question you have put up...probably you need to read more carefully...
ok... will clarify once again...we will take the example from that post only...
This example combines Object Repository(OR) and Descriptive Programming(DP) approach...that first two objects Browser and Page use OR and the last one WebRadioGroup use DP.
Now how to write DP? You need to find the unique property-value pair(s) [In the example above Name is property and txt_Name is its value similarly tag is property and INPUT is its value ]from the set of properties mentioned when you object spy on an object... an easier approach is to first record and find the unique properties QTP is using, then use the same property-value pair(s) for your DP code to identify the objects.
Similarly, you can extend this approach to Browser and Page objects.
ok... will clarify once again...we will take the example from that post only...
Code:
Browser(“Browser”).Page(“Page”).WebRadioGroup(“Name:=txt_Name”,”html tag:=INPUT”).set “Test”
This example combines Object Repository(OR) and Descriptive Programming(DP) approach...that first two objects Browser and Page use OR and the last one WebRadioGroup use DP.
Now how to write DP? You need to find the unique property-value pair(s) [In the example above Name is property and txt_Name is its value similarly tag is property and INPUT is its value ]from the set of properties mentioned when you object spy on an object... an easier approach is to first record and find the unique properties QTP is using, then use the same property-value pair(s) for your DP code to identify the objects.
Similarly, you can extend this approach to Browser and Page objects.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course