how to click the link in webpage by using QTP Script????????
Answers were Sorted based on User's Feedback
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 |
How u call functions in QTP
What is the concept of hooking in QTP?
What is data driver in qtp? Where we use it?
Currently i have designed my script based on the test cases present in Quality Center. I want to run my script from quality center. Can anyone help me to get the code which will connect QTP with Quality Center and execute the test cases?
what is output value in QTP and how it can be used in automation testing
How can we merge two repositories? Can we merge two differnt rep. I mean 1is peraction and other shared
4 Answers Tavant Technologies,
If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?
How do you return a value from a function
How to load the object repository at run time?
What is the difference between systemUtil and invoke method..?
Hello friends..... On which areas of an application we can not test with QTP
0 Answers Thatavarti Technologies,
Write script to fetch the data from global sheet where row number is 3 and parameter is "text"
3 Answers Accenture, Thomson Reuters,