May 30, 2008
Articles, Meir Bar-Tal
0
This short article complements a previous one I have published on how to Override the Object Exist Property. As previously indicated, one of the most powerful features QuickTest Professional (QTP) provides is the ability to override methods of object classes with custom functions tailored to serve specific purposes (Bar-Tal, 2008b). In this brief article we
Read More
March 31, 2008
Articles, Dani Vainstein, Files, Folders, QTips
0
System.IO.DirectoryInfo class exposes instance methods for creating, moving, and enumerating through directories and subdirectories. System.IO.File Provides static methods for the creation, copying, deletion, moving, and opening of files. Public Sub CopyDirectory( ByVal sourceDirectory, ByVal targetDirectory ) Dim srcInfo, trgInfo, sysFile, sourceFiles, sourceDirectories Dim i, j, fileItem, folderItem Set srcInfo = DotNetFactory.CreateInstance( "System.IO.DirectoryInfo",, sourceDirectory ) Set
Read More
April 1, 2008
Articles, Dani Vainstein, Files, QTips
0
CSV is short for comma-separated-values file, a text file in which individual elements separated by commas. For example, say you have a CSV file consisting of user first names, last names, and job titles; that file might look something like this: Ken,Myer,Accountant Pilar,Ackerman,Vice-President Carol,Philips,Research Specialist How can you create a CSV file all your own?
Read More
March 31, 2008
Articles, Dani Vainstein, DotNetFactory, Files, Folders, QTips
0
The following code example shows how to use the I/O classes to create a listing of all files with the extension 8220;.exe8221; in a directory. The output data is inserted to the local data sheet and also print to the QTP log. Option Explicit Dim pathStr Dim fileInfo, dirInfo, ioDir, dirsInfo Dim nFile, nLength DataTable.LocalSheet.Addparameter
Read More
April 1, 2008
ADODB, Articles, Dani Vainstein, QTips
0
The following code demonstrates how to create a new database named New_db.mdb. Set oConn = CreateObject( "ADOX.Catalog" ) oConn.Create "Provider = Microsoft.Jet.OLEDB.4.0; " & _ "Data Source = new_db.mdb"
Read More
April 1, 2008
ADODB, Articles, Dani Vainstein, QTips
0
The following code demonstrates how to create a new table in the Flight32.mdb Set oConn = CreateObject( "ADODB.Connection" ) oConn.Open "QT_Flight32" oConn.Execute "CREATE TABLE EventTable(" & _ "EventKey COUNTER ," & _ "Category TEXT(50) ," & _ "ComputerName TEXT(50) ," & _ "EventCode INTEGER ," & _ "RecordNumber INTEGER ," & _ "SourceName TEXT(50) ,"
Read More
April 1, 2008
ADODB, Articles, Dani Vainstein, QTips
0
a DSN, is a way for you to connect to a database merely by referencing the DSN name, and without having to specify the entire path to the database. That’s particularly handy if you have a bunch of scripts that access this database. If you hard-code the path into the scripts and then move the
Read More
April 1, 2008
Articles, Dani Vainstein, QTips
0
Demonstration script that combines the usage of classes and dictionary object. Script must be run on the local computer. Class Employee Private fname,lname,m_id,m_city,m_country Public Property Get FirstName() FirstName = fname End Property Public Property Let FirstName( value ) fname = value End Property Public Property Get LastName() LastName = lname End Property Public Property Let
Read More
April 28, 2008
.Net, Articles, QTips, Yanir Goren, Yaron Assa
0
The following solution by Yanir Goren will allow you to immediately expand any node in a DevExpress .Net tree.It8217;s a wonderful implementation of .Net custom controls analysis and manipulation, and involves a cool little hack involving node editing: 1: 'Initialization 2: Set oTree = SwfWindow("X").SwfObject("Tree") 'Change this to point to your application's tree object 3:
Read More
March 30, 2008
Articles, GUI Objects, Yaron Assa
0
Reminder Last time we implemented a tab navigation function for our custom control. We saw how to use the object-spy to locate 8220;interesting8221; RO properties and methods, and how to switch to debug view to drill even deeper into the inner control structure. Today we’ll master these techniques to implement our second goal – pressing
Read More