Answer Posted / imran sheikh
Objects in QTP are recognized by it's properties. When
object cannnot be recorded in OR or cannot be added in OR
due to some reason, we can identify an object by
Descriptive Programming. Small example of web application
which make DP clear is: Suppose there is a link which is
phone number, everytime we log-in with different user phone
link is changed. if we want to click the phone number we
cannot create it's object in repository because OR will
capture the present phone number,next time with second user
it's phone number link will not be clicked.To do that:
Set phoneLink = Description.Create
phoneLink("html tag").value = "Link"
phoneLink("name").value = DataTable.value("phone")
Browser(brw).Page(pg).Link(phoneLink).click
Here 'html tag' and 'name' are property whose value you can
confirm from Spy. If value of phone is there in DataTable
you can use as specified, else you can use regular
expression.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the use of Debug Viewer?
hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....
Describe how Smart Identification is used
Limitations in QTP?
Explain object spy in qtp.
What is the parameterization?
Which features or drawbacks of QTP lead to the upgrade for a newer version?
How will you compare keyword and expert view?
With what extension you can save the list of tests in a file to run in test batch runner?
How many types of object repository in qtp?
What is ‘object spy’ and what is the function of object spy in qtp?
Does quicktest professional (qtp) is unicode compatible?
How qtp identifies objects?
What is the use of running the scripts in Hidden-mode in UFT?
assume i have few url link how will i dynamically call then using descriptive programming?