Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


how to click the link in webpage by using QTP Script????????

Answers were Sorted based on User's Feedback



how to click the link in webpage by using QTP Script????????..

Answer / 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

how to click the link in webpage by using QTP Script????????..

Answer / gayathri

Browser().page().Link().Click

Is This Answer Correct ?    7 Yes 9 No

how to click the link in webpage by using QTP Script????????..

Answer / gayathri

Hi,

Browser().Page().WebLink().Click

Is This Answer Correct ?    3 Yes 11 No

Post New Answer



More QTP Interview Questions

What type of framework you are using in your company and explain it?

4 Answers   CTS,


Hi All, I am a beginner in QTP and have understood the basics of QTP by going through tutorial. I am trying to Automate a HRMIS application, What is the right approach to Automate this application. Kindly answer. Thanks in advance

1 Answers  


Explain getroproperty and gettoproperty & settoproperty?

0 Answers  


Explain Descriptive Programming Types with Examples?

0 Answers  


What is the differences between image check point and bit map check point?

0 Answers  






anyone can explain about "Hybrid framework" in QTP

5 Answers  


What are Child Objects?

1 Answers  


In my Script Firstly i have to parametrize the data then we import the data from c drive.suppose i have parametrize the Person name and company Name and i have enter one person name and one company name in the excel sheet now we import the sheet and the script is passed i want to ask one thing can we add more than one person name and more than one company name in the excel sheet suppose firstly we create person name "ADDy" and company nmae.'Wipro" and we set the current row in the script for this data and now we want run the script another set of data so how we can run the script with another set of data

2 Answers  


What is Virtual Users?

1 Answers   Crea,


How to Identify broken links in QTP

2 Answers   Ness Technologies,


How to build scripts that access data from external sources?

0 Answers  


if anyone has idea of the interview procedure in covansys, plz send me a mail?

0 Answers  






Categories