03-06-2008, 06:35 AM
Hi , I did as mentioned by Brian but now the code still sexecutes twice so I actually have four runs when the datatable contains only two rows of data . Attached is the code ,
I just want the script to run once for each row of the datatabel but for some reason it runs the script twice for each row ending up with four results .
----------------------------
---------------------------------
Thanks ,
Sonia
I just want the script to run once for each row of the datatabel but for some reason it runs the script twice for each row ending up with four results .
----------------------------
Code:
Dim Row
DataTable.Import("E:\OFT\login.xls")
Row=1
'This loop iterates for each instance of the login name
Do while (Row < (Datatable.GetRowCount+1))
DataTable.SetCurrentRow(Row)
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","C:\Documents and Settings\SSharma","open"
Browser("Home").Page("Home").Sync
Browser("Home").Navigate "https://www.ITS Inc.org/#"
Browser("Home").Dialog("Security Information").WinButton("Yes").Click
Browser("Home").Page("ITS Inc,.").WebEdit("txtusername").Set DataTable("username", dtGlobalSheet)
Browser("Home").Page("ITS Inc.").WebEdit("txtpassword").SetSecure "8e9d06e4654024dbf48"
Browser("Home").Page("ITS Inc").Image("header$loginButton").FireEvent "onmouseover"
Browser("Home").Page("ITS Inc").Image("header$loginButton").Click 11,11
Browser("Home").Page("ITS Inc").Link("LOGOUT").Click
Browser("Home").Page("ITS Inc").Sync
Browser("Home").Close
Row=Row+1
Loop
---------------------------------
Thanks ,
Sonia