Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP and Excel
#11
Solved: 11 Years, 4 Months ago
Hi , I did as mentioned by Brian but now the code still executes 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 datatable but for some reason it runs the script twice for each row ending up with four results .
----------------------------
Code:
Dim Row
DataTable.Import("E:\ITS\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
Reply


Messages In This Thread
QTP and Excel - by Sonia - 02-25-2008, 04:13 AM
RE: QTP and Excel - by deepakmehta82 - 02-26-2008, 06:19 PM
RE: QTP and Excel - by Sonia - 02-27-2008, 05:32 AM
RE: QTP and Excel - by Sonia - 02-28-2008, 05:18 AM
RE: QTP and Excel - by deepakmehta82 - 02-28-2008, 12:37 PM
RE: QTP and Excel - by Sonia - 02-29-2008, 05:06 AM
RE: QTP and Excel - by Brian - 02-29-2008, 09:08 AM
RE: QTP and Excel - by newqtp - 02-28-2008, 08:54 PM
RE: QTP and Excel - by deepakmehta82 - 02-29-2008, 10:50 AM
RE: QTP and Excel - by Sonia - 03-06-2008, 06:35 AM
RE: QTP and Excel - by Sonia - 03-06-2008, 06:36 AM
RE: QTP and Excel - by veerasekaran - 03-06-2008, 11:06 AM
RE: QTP and Excel - by Rajashekar Gouda - 03-06-2008, 03:39 PM
RE: QTP and Excel - by Sonia - 03-07-2008, 01:46 AM
RE: QTP and Excel - by svbrahma - 03-15-2008, 11:19 AM
RE: QTP and Excel - by sreekanth chilam - 03-15-2008, 11:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  excel macro to open QTP from excel karthik1979_us 1 11,107 11-07-2009, 02:57 AM
Last Post: geethwind

Forum Jump:


Users browsing this thread: 3 Guest(s)