VBScript

QTP GUI Objects, VBScript & Try Catch Finally

by Anshoo Arora ON August 30, 2010 · Posted In All, QTP, VBScript · 3 comments

VBScript’s error handling techniques have been quite limited to On Error statements, and even though they satisfy our needs to some extent, the lack of incorporating dynamic behavior with them has been a much bigger issue. In this article, I will implement a Try-Catch-Finally statement with QTP’s GUI objects along with an On Error statement. This will enable dynamic behavior and enable us to easily divide flow depending on different error conditions.

VBScript: Compare 2 Excel Files

by Anshoo Arora ON March 22, 2010 · Posted In All, QTP, VBScript · 75 comments

This post shows a quick and easy way to compare 2 Excel files. I know there are several code snippets on the inter-webs that show how to compare 2 Excel files, but what makes this technique different is performance. I know faster techniques are possible, but after much experiment, this was the one that continuously worked at the best speed in comparison to other methods.

CDO: Send Email from Yahoo, Hotmail, Live, AOL or GMail

by Anshoo Arora ON August 10, 2009 · Posted In All, QTP, VBScript · 34 comments

This article discusses 2 ways of sending e-mail from your Yahoo, Hotmail, Gmail, Live or AOL e-mail accounts using the ‘clsSendMail’ class:

Retrieve Server Response using XMLHTTP

by Anshoo Arora ON August 10, 2009 · Posted In All, QTP/Web, VBScript · 3 comments

This topic outlines the use of XMLHTTP object in VBSCript. It will show how to retrieve Server-side response without physically opening the page.

Passing Multiple Values from Functions

by Anshoo Arora August 10, 2009 3 comments

In this topic we will learn how to pass 2 or more values from function using Global Variables, Arrays, Dictionary Objects, Concatenated Strings and with the use of ByRef.

Passing Parameters ByRef & ByVal (Revised)

by Anshoo Arora August 10, 2009 17 comments

This article demonstrates the differences between ByRef and ByVal in VBScript. It will also provide the pros and cons and excellent examples to get you started immediately.