Arrays in QTP – Part 2
In the 1st part of this post we discussed about Static(fixed size) arrays. Now we are going to discuss another […]
In the 1st part of this post we discussed about Static(fixed size) arrays. Now we are going to discuss another […]
Dim iFileCount, FolderName, vFiles, objFSO iFileCount = 0 Set objFSO = CreateObject(“Scripting.FileSystemObject”) Set FolderName = objFSO.GetFolder(“C:Desktop”) ‘ Folder Path Set
Hello Friends! In this post, we’ll brush-up our understanding about vbscript arrays and to use arrays in QTP. Fisrt thing
‘This code demonstrate how to add new sheet to existing excel file and rename it at runtime Dim oExcel, oWB,
The following example will demonstrate, why synchronization is necessary in many situations. Option Explicit Dim orderNo, mypath mypath = Environment(
‘Getting value from an existing excel sheet Dim oExcel, oWB, oSheet, getVal Set oExcel=CreateObject(“Excel.Application”) Set oWB=oExcel.Workbooks.Open(“C:abhikansh.xls”) Set oSheet=oWB.WorkSheets(“Sheet1”) oExcel.Visible=TRUE getVal=oSheet.Cells(1,1).Value
‘This code demonstrate how to find the highest number in a numaric array. Dim num, i, Length1 num=array(34,12,98,43,89,49,56) Length1
‘Following code demonstrate how to count number of rows in Excel without opening it – using vbscipt in QTP. Set
In this post, we will look into the use of Error Handling in QTP. ‘”On Error Resume Next” is used
Dim mystring, myLength mystring = “abhikansh567st1239test” myLength = Len(mystring) For i = 1 To myLength If Asc(Mid(mystring, i, 1))