Tag Archive: Beginner

Jun 07 2008

A Free, External, .Net Object Spy

Max Sch had recently brought to our attention the existence of a free, external .Net object spy, which is far superior to QTP’s internal object spy, and .Net object spy. This new object spy is called Runtime Object Editor, and is downloadable from here (Courtesy of The Code Project). Update: there’s a more advanced version …

Continue reading »

May 27 2008

Reusing Web Objects after the Page Reloads

Will Roden from the Software Inquisition writes about a major undocumented feature in QTP, which could potentially allow you to write far more elegant test than though possible to date. One of the more frustrating limitations of QTP web test objects was that they went out of sync whenever the webpage reloaded. This means that …

Continue reading »

May 15 2008

Creating a ZIP Archive

Windows XP has a built-in ZIP mechanism integrated into its file-system. We can easily use this to create standard ZIP archives with only a few commands: 1: ‘Variable Declaration 2: Dim sSourceFolder 3: Dim sArchiveFile 4: 5: Dim oShell 6: Dim oZIP 7: Dim oSourceFolder 8: 9: ‘Variable Initalization 10: sSourceFolder = “C:\SomeFolder” 11: sArchiveFile …

Continue reading »

May 15 2008

Extracting a ZIP File

Windows XP has a built-in ZIP mechanism integrated into its file-system. We can easily use this to extract standard ZIP files with only a few commands: 1: ‘Variable Definition 2: Dim sZIPFile 3: Dim sExtractToPath 4: 5: Dim oShell 6: Dim oZippedFiles 7: 8: ‘Variable Initialization 9: sZIPFile=”C:\Source.zip” 10: sExtractToPath=”C:\Dest\InnerDir\” 11: Set oShell = CreateObject(“Shell.Application”) …

Continue reading »

Apr 23 2008

A Pitfall for Beginners when Working with a Dictionary

Introduction First and foremost I wish to thank two of my team members, Yasmin Helled and Eyas Kopty, who actually brought this issue to my attention. This post actually replaces an earlier post in which I prematurely and erroneously declared the issue as being a bug. My apologies to you, my loyal readers, for falling …

Continue reading »

Apr 12 2008

Display Records

The following example demonstrates how to display all records from a table. and loop thorough a record-set. Dim oConn, oRst, oField Dim sql set oConn = CreateObject(“ADODB.Connection”) oConn.Open “QT_Flight32” set oRst = CreateObject(“ADODB.recordset”) oRst.Open “Select * from Orders”, oConn Do Until oRst.EOF For each oField in oRst.Fields Print oField.Name & ” = ” & oField.Value …

Continue reading »

Apr 01 2008

Return ASCII Character Code of a Letter

The Asc function returns the ASCII code of the first character in the string. Print Asc( “ABCD” ) ‘ prints 65

Apr 01 2008

Convert ASCII Value to Character

The Asc function takes an ASCII character code and returns the character. Print Chr( 65 ) ‘ prints “A” Print Chr( 34 ) ‘ prints ” ( quote )

Apr 01 2008

Convert String to a Number

Use the CInt function to convert a string to Integer data subtype representation. Use the CDbl function to convert a string to Double data subtype representation. Use the CSng function to convert a string to Single data subtype representation. Use the CLng function to convert a string to Long data subtype representation. Use the CByte function …

Continue reading »

Apr 01 2008

Convert Number to a String

Use the CStr to convert a number into it’s string representation pi = 3.14 Print CStr( pi ) ‘ Prints “3.14”

Older posts «

Fetch more items