QTP
How to Replay a Script in QTP/UFT with Example
Once the script is recorded, you need to REPLAY the script to ensure the test steps have recorded...
Descriptive programming is used to execute operations on an Object in the AUT whose definition is not stored in the Object Repository. Using this mechanism, you can bypass identification from the Object Repository and supply the Object Description in the statement itself.
An object name is simply used to map an object in script with its description in an object repository. Meaning if you change the object name in your script and object repository, the script should run. Watch the following video on this concept
Click here if the video is not accessible
Video Highlights
You can use Descriptive programming in two ways
In Static Method, for object identification, you specify an object's property in the following format
property:=values,
This format is called property value pair and is enclosed in inverted commas>
If your object uses multiple descriptions for identification, you can specify those using commas>
So in our case, the description for Agent Name becomes
"nativeclass:=Edit", "attached text:=Agent Name:"
The second method of doing the same action is using Dynamic Descriptive programming
In case your script uses the descriptive programming object candidate multiple times, it will be very tiresome to specify all the property value pairs for each statement
In such cases, you can make use of Description Class provided by QTP
The syntax for creating a description object is
Set MyDescription = Description.Create(); MyDescription("property").Value = "property-value";
This is the Dynamic Method
Video Transcript
Set allObjects = Browser("Jobs").Page("QTP").ChildObjects()
Once the script is recorded, you need to REPLAY the script to ensure the test steps have recorded...
What is QTP/UFT? QTP is an automated functional Testing tool that helps testers to execute...
This tutorial demonstrates OBJECT SPY. Object Spy can help determine the useful properties and...
If you have segments of code that you need to use several times in your tests, you may want to...
What is Action in QTP? Actions help divide your test into "logical units" or "Business Processes". Actions help...
Using Recovery Scenarios you can instruct HP UFT to recover from unexpected events and errors that...