06-12-2012, 03:01 PM
Hi,
When u click the link 1st time a new page is open , due to which reference object u have created is lost.
I implemented the same on google home page.
Below is the code, use it as a refrence.
Regards,
Sankalp
When u click the link 1st time a new page is open , due to which reference object u have created is lost.
I implemented the same on google home page.
Below is the code, use it as a refrence.
Code:
SystemUtil.Run "iexplore.exe","www.google.co.in"
Set desc=Description.Create()
desc("micclass").Value="Link"
desc("html tag").value="A"
Set obj=Browser("Google").Page("Google").ChildObjects(desc)
MsgBox(obj.Count)
For i=0 to obj.Count-1
Set odesc=Description.Create()
odesc("micclass").Value="Link"
odesc("html tag").value="A"
Set obj1=Browser("Google").Page("Google").ChildObjects(odesc)
obj1(i).Click
'Browser("Google").Page("Google").Link("Search").Click
Browser("Google").Close
SystemUtil.Run "iexplore.exe","www.google.co.in"
Next
Regards,
Sankalp