Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what is the difference between the modular framework and datadriven frame work

2481


How you know that a test case is a regression test case

4005


How is a Step generator used in UFT?

1211


How will you test a stapler?

1116


Should have experience in framework means?

1897


Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com

1859


What is the quicktest professional testing process?

1164


What test you perform mostly? Regression or retesting in your testing process?

1030


How qtp identifies objects?

1002


How do you send email with attachment from outlook using qtp ?

1020


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 ,

1884


how to evalute defects in QTP script?

2008


What are the views available in quicktest professional?

1019


Explain about business process component? types and usage?

2060


What are the different recording modes?

995