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 |
What is the exact difference between QTP and RFT ?
How you can write contexts to text file in qtp?
Can we directly automate testscripts accrdoing to requirements? WHY ?
what are the cases in which we use XML and accessibility check points.
How can we disable smart identification at the time of recording? Ideally, smart identification should be enabled only at the run-time.
How many types of recording modes in qtp? Describe each type with an example where we use them?
Explain about reusable actions?
how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer
tell me QTP standards ?plz
When a requirement is given to u to automate , What is ur basic approach ?
When ‘option explicit’ keyword is used in qtp?
How do you delete unwanted results in qtp?