Background One of the more frustrating aspects of automating any complex application is knowing that the application holds a lot useful information which isn’t accessible to QTP. Sometimes accessing the information is just not possible by any means (for example, accessing runtime properties from MFC applications), but other times, it seems to be just a …
Category Archive: .Net
Aug 12 2009
Conversion
Every average QuickTest user probably knows that if he needs to make a number conversion he will use the two built-in functions supplied by VBscript Hex The Hex function returns a string that represents the hexadecimal value of a specified number. Note: If number is not a whole number, it is rounded to the nearest …
Jan 10 2009
.Net Objects, Runtime Hierarchies and Bizarre QTP Errors
I’ve recently came across a disturbing phenomenon regarding .Net automation with QTP, and thought I would share it with our readers. I hope some of you could shed some light on this mystery. First, some background: As described in our article about Exploring Custom Controls, sometimes QTP fails to properly recognize the AUT’s controls, and …
Jun 24 2008
Running QTP on 64bit .NET Applications
Benny Abergel was kind enough to share the following valuable QTip with us: QTP can work on 64 BIT OS with one big limitation – 64bit application cannot be recorded/replayed. QTP will work only on 32bit application (many of the AUT can work on 64bit but are actually work on 32bit mode – can be noticed …
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 …
Apr 28 2008
Expanding .Net DevExpress Trees
The following solution by Yanir Goren will allow you to immediately expand any node in a DevExpress .Net tree.It’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: …
Apr 02 2008
Sorting a String Array
Sorting arrays in VBScript has never been easy; that’s because VBScript doesn’t have a sort command of any kind. In turn, that always meant that VBScript were forced to write their own sort routines, be that a bubble sort, a heap sort, a quicksort, or some other type of sorting algorithm. But that was before …
Apr 01 2008
Ping a Specified Server
The Network Class belongs to Microsoft.VisualBasic.Devices namespace. The .NET Ping method is overloaded, the return value is always Boolean. ( Conversion Required ) String. The URL, computer name, or IP number of the server to ping. Required. Uri. The URI of the server to ping. Required. Int32. Time threshold in milliseconds for contacting the destination. …
Apr 01 2008
Send Keys to Active Window
The Keyboard.SendKeys Method sends one or more keystrokes to the active window, as if typed on the keyboard. Syntax: object.SendKeys( keys, wait ) Parameters : keys – A String that defines the keys to send. wait – Optional. A Boolean that specifies whether or not to wait for keystrokes to get processed before the application …
Apr 01 2008
Keyboard Status
The Devices.Keyboard class Provides properties for accessing the current state of the keyboard, such as what keys are currently pressed, and provides a method to send keystrokes to the active window. How can we know if CAPS-LOCK already pressed? Before we use the numpad keys we want to verify that if NUM-LOCK already pressed. The …


Recent Comments