01-23-2008, 07:19 PM
Pass the data u want to test from our to DataTable and use the For loop to remeat the scripts
sample code
sample code
Code:
Dim br,url,num,i
br = "C:\Program Files\Internet Explorer\iexplore.exe"
url = "www.google,com"
On error resume next
systemutil.Run br,url,"","open",3
If err.number <> 0 Then
Reporter.ReportEvent 1,"Failed","The Browser and url has not been invoked"
exitrun(0)
else
Reporter.ReportEvent 0,"Passed","The application has been invoked successfully"
End If
Datatable.ImportSheet "path,"ddd","ddd"
num=datatable.GetSheet ("ddd").Getrowcount
msgbox (num)
For i=1 to num
DataTable.GetSheet("ddd").SetCurrentrow i
Browser("name:=df"page("title:=dfs").WebEdit("html id:=fsfse").Set datatable("dfsvd",dtLocalSheet)
Browser("name:=dfefs").page("title:=dfsdfs").WebEdit("html id:=fsdf").click
Browser("name:=dfefs").page("title:=dfsdfs").WebEdit("html id:=fsdf")..Set datatable("password",dtLocalSheet)
Browser("name:=dfefs").page("title:=dfsdfs").WebEdit("html id:=fsdf").WebButton("name:=fsdf").click
Next