It seems Interview questions from Ordain Solutions are
almost BASIC LEVEL-Easy.
I am asking one tough question..(I think.. May be easy for
some people)
In recorded script the - WebLink("cityinfo")
In reality, the WebLink name is "generalinfo"
How you can write function to click that changed web link.
NOTE: This functin should work with any Dynamic text link.
I will post the answer later.

Answer Posted / satish j

You can use regular expression to handle this.
so if the value of the name changes at run time it hardly
matters for QTP ,but if there are multiple links on apage
which typically is the case using only RE will not work as
object identification will be an issue. so along with this
provide assistive properties like html - tag, or alt
property,whcih are unique to the object so if recognition
becomes a problem it can be handled.

you can use the description object.
set weblinkrec = description.create
weblinkrec("name").value = ".*"
weblinkrec("htmltag").value = "xyz"
.....
and then use
Weblink(weblinkrec).click.
Note:

But always use smart identification where ever it is needed
as it slows down the execution of the script, typically when
there are same objects having conflicting properties.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach

1608


Describe function procedure in vbscript.

555


Explain the types of object repository?

559


How the exception handling can be done using quicktest professional (qtp)?

573


How many types of recording modes in qtp?

592






Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji

1378


what are the challenges you have faced while testing web based application using the automation tools ?

598


Have you used xml check point in your project?

557


What are the major/ important methods, functions in QTP we use realtime testing

2268


what is the diff between manual test plan document and automation test plan doc.can u explain indetail.

1645


how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

1313


I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?

599


What is difference between shared and local object repository?

589


I want to read XML file loaded in Quality center and compare the values with the values displayed in Application (web table).How can I do that

1400


diff between qtp versions from 8.5

1571