‘**********************************************************************************************************************************
'GETTING CHILD OBJECTS AND PERFORMING OPERATIONS
‘Let us assume, QuickTest is unable perform click operation on particular link in a specific page. Resolution is like getting all the child objects of type Link and can click with VB Scripting.
‘**********************************************************************************************************************************Public Function funcClickOnLink()
‘Creating Description Object with common properties of links
Set objDescLink = Description.Create()
objDescLink ("micclass").Value = "Link"
objDescLink ("html tag").value="A"
‘Capturing all the child links from the page
Set objLinks = Browser("title := Gmail: Email from Google").Page("title:=Gmail: Email from Google").ChildObjects(objDescLink)
‘Getting the Link Count
intLinkCount = objLinks.Count
‘Repeating the loop intLinkCount of times
For i = 0 to intLinkCount
‘Getting the InnerText of every link
strLinkText = objLink(i).getroproperty("innertext")
‘If found required link, click and exit for
If strLinkText = "About Gmail" Then
objLinks (i).Click
Exit For
End If
Next
‘**********************************************************************************************************************************
Please send the QTP material
ReplyDeleteAm new to QTP
Am planning to learn qtp
How to prepare pls give the guidence
Hi,
ReplyDeleteThanks for you your interest. Please call me on this number 9620075089, we can discuss on this,
Thanks,
Bala