Owner: AdvancedQTP URL:http://advancedqtp.com Join Date: Tue, 18 Sep 2007 16:01:10 -0500 Rating:0 Site Description: Learn advanced programming in Quicktest Professional (QTP) and VBScript Site statistics:Click here
Report hierarchical events in QTP log 2008-04-11 00:20:47 Motivation
The QTP native log has many drawbacks, especially if your scripts relay heavily on Functions. While Actions are reported in an hierarchical structure (i.e. nested according to their call chain), events
reported by function are reported in a flat, unsorted manner. This can be illustrated by the following example:
The following QTip will allow [...]
Get all processing on the local machine 2008-04-10 23:23:25 Get all running processing on the local machine:
Dim objWMIService, objProcess, colProcess
Dim strComputer, strList
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\” _
& strComputer & “\root\cimv2″)
Set colProcess = objWMIService.ExecQuery _
(“Select * from Win32_Process”)
For Each objProcess in colProcess
strList = strList & vbCrLf & _
objProcess.Name
Next
Print strList
Sending an HTML email from a pre-made file 2008-04-10 23:17:20 This QTip is another variation of Sending
an HTML email.
Windows 2000 and Windows XP use CDO messaging as a replacement for CDONTS. Sending email with CDO is a simple task. First we create a reference to the CDO component:
Set objMessage = CreateObject(“CDO.Message”)
Then fill-in Sender, Subject and Recipient (To) fields of the headers and the [...]
Getting the current mouse cursor 2008-04-09 23:28:01 Sometimes, you can only tell when an AUT operation has ended by checking the windows mouse cursor - is it an hourglass, or a simple arrow.
The following code allows your to get the integer code of the mouse icon:
Parameter exists? 2008-04-07 11:46:12 The following function will return True if a parameter ( column ) exists in a specific datasheet or False otherwise. Read more:Parameter
Working with DOS command line 2008-04-15 18:29:53 The objectives of this article are :
Learn how to use DOS command
lines in QTP.
Alternative complex tasks.
Alternative .NET methods.
QTP running on Mac OS-X (sort of)! 2008-04-17 02:46:24 Well, of course I’m lying (sort-of). QTP can’t really run natively on Macs.
However, this picture was really captured on my new MacBook-Pro laptop, and I really had QTP running
on it (just like I’m writing this post from Windows-Live-Writer on it). No Photoshop tricks were involved (other than converting the image to JPG).
The [...]
No title 2008-04-20 11:16:36 Dear AdvancedQTP Users,
I hereby begin with my own personal blog to be published exclusively at the AdvancedQTP site.
I hope to be able to bring out the best from my extensive experience in the world of software in general and automation especially for the benefit of our growing community.
Please stay tuned for future updates.
On this occasion [...]
Get the body of a specific message 2008-04-21 03:04:17 The following code will attach to the Outlook inbox folder, loop through all the unread messages, and search for a message with a specific subject.
If the message is found, it's marked as read, so we won't re-find it in future searches.
Firebug 2008-04-23 10:39:56 Firebug is the most advanced free web analysis tool to date. While some of its functionality may resemble IE development toolbar (reviewed here), its scope, extra features and attention to details make it invaluable both to QA personal and web-designers. It's fair to say that the only advantage IE development toolbar has over Firebug, is the fact that some websites only work with Internet Explorer, making it impossible to work with firebug (which runs on firefox). Having said that, if you're working with a site which works both with IE and with Firefox, firebug will blow your mind.
Amazing Bug in the Dictionary Object! 2008-04-23 12:09:41 In a team I’m now leading we’ve found an amazing bug during the last week. The whole credit goes to two of my team members, Yasmin Helled and Eyas Kopty, who actually brought the bug to my attention.
Introduction
Last week Yasmin showed me a piece of code similar to the following (I simplified it a [...] Read more:Amazing
, Dictionary
, Object
Set a custom directory for QTP tests 2008-04-25 16:10:38 This QTip will show you how to change QTP's default test directory, thus freeing you from endlessly browsing for the relevant directory whenever you save / open a test. Read more:custom
, tests
Say updated via Twitter 2008-04-29 00:45:25 For those of you who are using Twitter
, keeping track with AdvancedQTP updates is now easier than ever!
Expanding .Net DevExpress trees 2008-04-28 06:55:14 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.
Read Excel range into an array 2008-05-01 08:08:04 Usually, we only want to read some data from an Excel
worksheet, and we’ll be more than happy to get that data in a simple 2-dimensional array.
Later we can loop through the array, and access the data in a quick and easy fashion.
Here’s a function which receives an Excel file, the workbook name and returns [...]
HP publishes a new Delphi Add-In for QTP 9.5 2008-05-01 22:41:39 HP had published (30/4) a new Add-In for QTP 9.5 - The Delphi
Add-In. The new add-in supports controls and objects in the Delphi environment, and offers the ability to write extensibilities for new controls and objects. Read more:publishes
Pad Number String with Zeroes 2008-05-03 07:18:05 Sometimes a numbered list is required, such as a list to populate a ListView, TreeView or one to create sequential files in a folder. One of the main problems is that such lists typically sort the items lexicographically, so that numbered items end-up in the wrong order, such as File_1, File_10, FIle_11, …, File_2, FIle_20, [...] Read more:Number
, String
, Zeroes
Extracting a ZIP file 2008-05-15 14:42:31 Extract ZIP files with only a few simple commands
Override the Object Exist Property 2008-05-18 15:03:29 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. For example, the WebEdit.Set method might be expanded to first check if a popup message is open before or after (or both) the set operation took place. This [...] Read more:Object
Get pixel color 2008-05-26 02:32:13 Get the color code of a given pixel on the screen.
Reusing Web-Objects after the page reloads 2008-05-26 19:27:43 Will Roden from the Software Inquisition writes about a major undocumented feature in QTP, which allows you to reuse references to web-objects even after the page loads.
Add New Methods to Objects 2008-05-30 16:05:40 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:Methods