Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
8Activity
0 of .
Results for:
No results containing your search query
P. 1
Excel scripts

Excel scripts

Ratings: (0)|Views: 80|Likes:
Published by G.C.Reddy
For more QTP Information & Scripts visit: www.gcreddy.com

1) Data Driven Testing through an External Excel Sheet
1) Set myExcel=Createobject("Excel.Application") 2) Set myFile=myExcel.workbooks.open ("C:\Documents and Settings\admin\My Documents\gcreddy.xls") 3) Set mySheet=myFile.worksheets("Sheet1") 4) Rows_Count=mySheet.usedrange.rows.count 5) For i= 1 to Rows_Count 6) Agent=mySheet.cells(i,"A") 7) pwd=mySheet.Cells(i,"B") 8) SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Pro
For more QTP Information & Scripts visit: www.gcreddy.com

1) Data Driven Testing through an External Excel Sheet
1) Set myExcel=Createobject("Excel.Application") 2) Set myFile=myExcel.workbooks.open ("C:\Documents and Settings\admin\My Documents\gcreddy.xls") 3) Set mySheet=myFile.worksheets("Sheet1") 4) Rows_Count=mySheet.usedrange.rows.count 5) For i= 1 to Rows_Count 6) Agent=mySheet.cells(i,"A") 7) pwd=mySheet.Cells(i,"B") 8) SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Pro

More info:

Published by: G.C.Reddy on Feb 13, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

09/15/2010

pdf

text

original

 
For more QTP Information & Scripts visit: www.gcreddy.com1) Data Driven Testing through an External Excel Sheet
1) Set myExcel=Createobject("Excel.Application")2) Set myFile=myExcel.workbooks.open ("C:\Documents and Settings\admin\MyDocuments\gcreddy.xls")3) Set mySheet=myFile.worksheets("Sheet1")4) Rows_Count=mySheet.usedrange.rows.count5) For i= 1 to Rows_Count6) Agent=mySheet.cells(i,"A")7) pwd=mySheet.Cells(i,"B")8) SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTestProfessional\samples\flight\app\flight4a.exe","","C:\Program Files\MercuryInteractive\QuickTest Professional\samples\flight\app\","open"9) Dialog("Login").Activate10)Dialog("Login").WinEdit("Agent Name:").Set Agent11)Dialog("Login").WinEdit("Password:").SetSecure pwd12)Dialog("Login").WinEdit("Password:").Type micReturn13)Window("Flight Reservation").Close14)Next
2) Exporting Data from a Database to an Excel Sheet
1) Dim con,rs2) Set con=createobject("adodb.connection")3) Set rs=createobject("adodb.recordset")4) con.provider="microsoft.jet.oledb.4.0"5) con.open"C:\Documents and Settings\admin\My Documents\gcr.mdb"6) rs.open"select*from Login",con7) Set ex=createobject("Excel.Application")8) Set a=ex.workbooks.open("C:\Documents and Settings\admin\MyDocuments\gcr.xls")9) Set b=a.worksheets("sheet1")10)i=111)Do While Not rs.EOF12)b.cells (i,1).value=rs.fields("agent")13)b.cells(i,2).value=rs.fields("password")
For Manual Testing docs visit: www.gcreddy.net
1

Activity (8)

You've already reviewed this. Edit your review.
1 hundred reads
123santy liked this
kmdasari liked this
kmdasari liked this
vimmak liked this
jakiechan liked this
satishkumar360 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->