09-03-2009, 03:16 PM
hi,
I have click on the page nos displayed in my search screen and for that i have written the below code but the problem is it clicks only on 2nd page and then qtp throws an "General Run error" when for loop gets executed for 2nd time.
Please let me know how to resolve the issue
I have click on the page nos displayed in my search screen and for that i have written the below code but the problem is it clicks only on 2nd page and then qtp throws an "General Run error" when for loop gets executed for 2nd time.
Please let me know how to resolve the issue
Code:
Dim NumberOfLinks
Set oDesc = Description.Create()
oDesc("micclass").Value = "Link"
Set LinkCnt = Browser("Bro").Page("page").Webelement("elm_PageNos").ChildObjects(oDesc)
NumberOfLinks = LinkCnt.Count
For i = 0 To NumberOfLinks
LinkCnt(i).highlight 1
LinkCnt(i).Click
Next