05-19-2011, 03:36 PM
(This post was last modified: 05-19-2011, 04:01 PM by Unleash Rajesh.)
Code:
Function Open( )
dim IE
set IE = CreateObject("InternetExplorer.Application")
IE.visible = true
IE.stop
wait(5)
IE.navigate "http://www.google.com"
set Open = IE
Set IE= nothing
End Function
Dim IEexp
set IEexp = Open()
Dim IEobj, obrowser,opage,links,objlink,linkcount
Set IEobj = open()
Set oBrowser= Description.Create()
oBrowser("micclass").Value = "Browser"
set oPage = Description.Create()
oPage("micclass").Value = "page"
set Links = Description.Create()
Links("micclass").Value = "Link"
set objLinks = Browser( oBrowser).Page( oPage).ChildObjects(Links)
LinkCount = objLinks.Count
msgbox LinkCount
For i = 0 To LinkCount-1
set Links = Description.Create()
Links("micclass").Value = "Link"
set objLinks = Browser( oBrowser).Page( oPage).ChildObjects(Links)
objLinks(i).Click
datatable.SetCurrentRow(i+1)
datatable("Lname",global)=Browser( oBrowser).Page(oPage).GetROProperty("href")
Browser(oBrowser).Back
Next...
It throws an error in Lname...Could u plz guide me how to overcm this..is there anything i need to add in the datatable of Expert view.
How i can start learning scripts in QTP...I feel i can go fm the concepts and then to deeper into it...Provide sm materials.....