how to click the link in webpage by using QTP Script????????
Answer Posted / maheshbabu.t
Hi this Mahesh I am sending answer for Above Question
step-1
U can write normal script below
Broser(B.Name).Page(P.Name).Link(L.Name).Click
Step-2
If u write function :
Public Function ClickLink(B.Name,P.Name,L.Name)
If Browser(B.Name).Page(P.Name).Link(L.Name).Exist Then
Browser(B.Name).Page(P.Name).Link(L.Name).Click
End If
End Function
Then u Call Function
Step -3
Descriptive Programe
Function linkClick(linkName,linkIndexVal)
ClearDialogs()
strHandle = Window
("RegExpWndClass:=IEFrame","index:=0" ).GetROProperty
("hWnd")
Set gobjBrowser = Browser("hWnd:=" & strHandle)
Set gobjPage = gobjBrowser.Page("index:=1")
gobjPage.Sync
Set objDescription = Description.Create()
objDescription("Class Name").Value = "Link"
objDescription("html tag").Value = "A"
objDescription("name").Value = linkName
If gobjPage.Link(objDescription).Exist(0) Then
gobjPage.Link(objDescription).Click
else
objDescription("index").value=linkIndexVal
If gobjPage.Link(objDescription).Exist(0)
Then
gobjPage.Link(objDescription).Click
else
Print linkName&" Link not Exist"
End if
End If
End Function
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Is text area check point supports for web applications?
What is debugging? How you debug your script?
How does qtp recognize objects in aut?
write the vb script for call to new action in qtp?
What is the difference between Keyword Driven test and Data Driven test?
How to associate function library at a run time?
I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me
how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)
How can I use Call dlls in QTP ?
Explain how you can find the absolute value of the number in qtp?
i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?
Write a QTP script to enter a keyword in to Google search engine?
Where to use Property Let, Property Get, Property Set in UFT
How to use parameterization in qtp?
How do you compare the structure of 2 tables in database and check whether they are similar using qtp.