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
what is the difference between the modular framework and datadriven frame work
How you know that a test case is a regression test case
How is a Step generator used in UFT?
How will you test a stapler?
Should have experience in framework means?
Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com
What is the quicktest professional testing process?
What test you perform mostly? Regression or retesting in your testing process?
How qtp identifies objects?
How do you send email with attachment from outlook using qtp ?
Does any one worked on JIL Emulator , Testing with QTP(automation). Trail Version of QTP is not identifying the child objects of JIL emulator, Can any one help me out ,
how to evalute defects in QTP script?
What are the views available in quicktest professional?
Explain about business process component? types and usage?
What are the different recording modes?