Descriptive programming is used when we want to perform an operation on an object without stored in the object repository. This way QTP won't search for the object properties in the Object Repository, but will take it from the statement.
In
a simple language, you have to write everything on the script and get the value
and properties by using Object Spy.
Descriptive
Programming can be done two ways:
Ø Static and
Ø Dynamic
Static: It is like a regular recoded script.
Dynamic: In a dynamic way instead of defining object
in every line we can define it in a one place and use it everywhere. Using Description.Create
we can define our own object.
Example: For Insert UserName WebEdit:
Set objWE_UserName=Description.Create
objWE_UserName("html tag").value="INPUT"
objWE_UserName("name").value="user"
objWE_UserName("type").value="text"
Example: For Insert UserName WebEdit:
Set objWE_UserName=Description.Create
objWE_UserName("html tag").value="INPUT"
objWE_UserName("name").value="user"
objWE_UserName("type").value="text"
No comments:
Post a Comment