All

Selenium PageObjects and PageFactory

by Anshoo Arora ON May 1, 2012 · Posted In All, Selenium · 0 comments

This article discusses the PageObject design pattern and the PageFactory class from WebDriver support libraries. I believe this is a very robust way to model your tests. The way this design pattern is formulated, it becomes easier making changes to the flow, logic or the UI. A few discrepancies between the C# and Java implementation of the PageFactory have been included as well.

Using NUnit to Execute Selenium WebDriver Tests

by Anshoo Arora ON April 30, 2012 · Posted In All, Selenium · 0 comments

In this article, I will explain the basics of using NUnit as the unit/regression testing framework along with the WebDriver API to automate Web browsers. NUnit is developed using C# and uses an attribute based programming model. A great thing about NUnit is that its very easy to learn and allows us to abstract away our tests and enable us to focus on the test code.

Selenium – An Introduction

by Anshoo Arora ON March 27, 2012 · Posted In All, Selenium · 21 comments

This article provides an introduction to Selenium and the Selenium Suite of tools: Selenium IDE, Selenium Grid, Selenium RC and Selenium WebDriver. It also answers some common questions revolving Selenium. I have created a simple example with the well-known Mercury Tours website to understand how to write tests using the WebDriver API.

Testing Web Services using QTP, VBScript

by Anshoo Arora ON March 16, 2012 · Posted In All, QTP, VBScript · 15 comments

This article was originally requested by one of our visitors – Dhup Chaya. It shows a way to work with Web Services (Google’s Distance Matrix API) using XMLHTTPRequest (sending request & receiving response) and parsing the response with both XMLUtil and XMLDOM.

Book Review and Giveaway – And I Thought I Knew QTP

by Anshoo Arora September 26, 2011 108 comments

Review of And I Thought I Knew QTP – a technical novel by Tarun Lalwani. Anshoo Arora (yours truly) had the opportunity to work on this project as the Technical Editor & Reviewer. 3 free copies will be given away to the lucky winners signed by both Tarun and I.

IntelliSense for your Custom Class in 6 Steps

by Anshoo Arora June 30, 2011 24 comments

I have been researching this topic for a very long time and I finally have a workaround which I have tested for for the last 2 months with great success. The best part about this workaround is, I just need to create wrappers, without including any of the code I have in my QTP function libraries. If I add a new method to my class, all I do to update the Intellisense is add the method (without the QTP code) in my VB lib, create a DLL and Register the library for COM Interop.

Get Row/Column Of An Object in a WebTable

by Anshoo Arora June 27, 2011 68 comments

This article shows a simple way of finding out in which cell a QTP’s Test Object resides.

ExcelUtil Class Library (MS Excel Utility Methods)

by Anshoo Arora March 12, 2011 28 comments

Over the past few years, I have read numerous threads and posts talking about working with Excel using VBScript. Not only have there been numerous threads, but also frameworks that use Excel as the input and/or driver engine. I wanted to work on this mini-project for a long time, and I finally have Version 1.0 of ExcelUtil ready for download! It comes with .CHM documentation.

Executing QC TestSet via OTA API (QCRunTestSet)

by Anshoo Arora January 10, 2011 41 comments

Over the past few weeks, I have been actively working on Quality Center (ALM) and its integration with QuickTest Professional. One of the mini-projects I’ve worked on is creating a custom object that executes a test set and sends an email to the supplied distribution list from ALM TestSet’s Automation tab. VBScript code available for download.

IE Error: A script is causing IE to run slowly

by Anshoo Arora December 5, 2010 11 comments

This tip shows how to disable the Error message: “A script on this page is causing Internet Explorer to run slowly” with using VBScript.

QTP CreationTime

by Anshoo Arora September 3, 2010 20 comments

This article explains how the Browser’s CreationTime ordinal identifier works in QTP with examples.

QTP GUI Objects, VBScript & Try Catch Finally

by Anshoo Arora August 30, 2010 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.

Browser: Not Required!

by Anshoo Arora May 2, 2010 32 comments

There is a common perception that we must include the Browser object in hierarchies when working in the Web environment. The truth is that, we really don’t need to include the Browser object if the Page object has been included in the hierarchy.

Eval Function & Execute Statement

by Anshoo Arora April 21, 2010 45 comments

This topic covers the concepts of the Eval function and Execute statement in depth. The function Eval is used to evaluate a string and return the result of the string expression. The Execute statement on the other hand, executes one or more statements in a string expression and enables creation of dynamic code. Multiple statements can be executed at once by using colons or line breaks to separate them.

Regular Expressions and Select Method (ListBox)

by Anshoo Arora April 19, 2010 31 comments

This post describes a few ways to use Regular Expressions to select the target item from List objects. All examples of this post demonstrate techniques to be used in Web Applications, but they can be easily extended to technologies that store all list items with delimiters.

VBScript: Compare 2 Excel Files

by Anshoo Arora March 22, 2010 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.

QTP: Working With SiebList (Revised)

by Anshoo Arora March 20, 2010 9 comments

The previous articles written for the Siebel category were written from a perspective of version 7.7 and 7.8. I know of many of you have already have upgrades Siebel to 8.1, and so have we! This gave me a chance to update my old article on the SiebList object. Not much has changed, actually, but the code here has been optimized for better performance and compatibility with the latest version. Information regarding its limitations has also been included.

Automating GMail with QTP

by Anshoo Arora March 18, 2010 132 comments

This article is a tutorial which shows how parts of GMail can be automated through QuickTest Professional. GMail is an extremely dynamic UI and always quite challenging to automate successfully. Its dynamic behavior also makes it an excellent candidate to practice QTP with and sharpen your skills. I will try to show a few techniques that can be helpful in automating GMail, and through it, automating any dynamic application that you encounter.

Book Review: QuickTest Professional Unplugged

by Anshoo Arora March 9, 2010 7 comments

This is a short review of the book QuickTest Professional Unplugged, which is the first book of its kind to be made available to the QuickTest community.

QTP Browser Methods: .Activate .Maximize .Minimize

by Anshoo Arora March 8, 2010 58 comments

This article demonstrates a quick tip to activate, minimize or maximize browsers. Unlike a Standard Windows Window object, Browser does not support the Activate, Minimize, Maximize methods. Therefore, we can create our custom function and tie it with the Browser object using RegisterUserFunc.

QTP: Accessing Custom DLL Methods Through DOTNetFactory

by Anshoo Arora February 20, 2010 107 comments
Custom DLLs with QTP Through DOTNetFactory

This article shows a quick and easy way to use DLLs in QTP and access their methods with the help of DOTNetFactory. It also shows a working example of a DLL created in Visual Basic .NET and its methods accessed in QTP.

QTP: Parameterization with Excel

by Anshoo Arora February 5, 2010 143 comments
Parameterization with Excel

In the previous article, we parameterized a test for a Login process with the help of QTP’s Local DataTable. This topic covers the same concept with the help of an (external) Excel file. The process will remain the same, but how we extract data differs.

RelevantCodes[1]One – QTP Automation Framework

by Anshoo Arora January 4, 2010 265 comments
RelevantCodes[1]One Automation Framework

The first release of RelevantCodes[1]One, a Keyword-Driven Automation Framework Demo Project is available and ready for download. Usage examples and Videos included.

QTP GetROProperties (Custom)

by Anshoo Arora December 10, 2009 22 comments
GetROProperties Custom Method

There have been numerous threads/discussions about the lack of GetROProperties, which is not available with the QuickTest package. There is GetTOProperty, GetROProperty, GetTOProperties and until now, GetROProperties was the only method missing from the pack. Now, its available and it works just like GetTOProperties does.

RegisterUserFuncX: Register Methods To All QTP Objects Automatically

by Anshoo Arora December 8, 2009 36 comments
RegisterUserFunc Custom

This post demonstrates the custom method RegisterUserFuncX, which can be used to automatically register custom methods to all objects automatically. Be sure to read the comments by Tarun and Motti which cover one limitation with resolution of the other. Enjoy.

QTP: Working With Multiple Windows Applications

by Anshoo Arora November 26, 2009 14 comments
Working with Multiple Windows Applications

There are several instances where automation developers have to work with applications containing multiple windows, in a Standard Windows Environment. This technique uses a similar methodology as demonstrated in the article for Web-based apps, but the crux of this technique differs. It can be used by automation developers testing most types of windows applications.

Introduction to Parameterization with QTP’s Local DataTable

by Anshoo Arora November 23, 2009 117 comments
Parameterization with Local DataTable

Parameterization is a process in which parameters, or variables are substituted for hard-coded values which help perform the same operations on the AUT with multiple sets of data. In other words, in QTP, parameterization helps automation developers test an application with different data from a single action (or multiple actions) through multiple iterations.

Updates: Upcoming Automation Framework

by Anshoo Arora November 12, 2009 23 comments
RelevantCodes[1]One Automation Framework Updates

This post contains the updates regarding the upcoming automation framework as well as some ideas that might be included in its first release, which will be available for trial and download sometime during January 2010. Enjoy!

QTP: Get Link’s Mouse Over (Hover) Color

by Anshoo Arora November 5, 2009 39 comments
Get Link's onMouseOver Color with QTP

This post describes a simple technique that can enable retrieval of a Link’s onMouseOver color by simply changing the ReplayType setting before the onMouseOver FireEvent Event.

Automating Windows Calculator Part 1

by Anshoo Arora October 28, 2009 29 comments
Calculator

In this article, we will see a few interesting ways to automate the Windows Calculator. The concepts in this article should serve as an excellent way of understanding the automation process with QTP, how functions can help increase code reuse, and why at times its extremely important to validate user-input. A must read!

QuickTest’s Custom CheckPoints and Beyond

by Anshoo Arora October 21, 2009 65 comments

This article will discuss the concepts of Custom Checkpoints, their benefits, when to use them and how they provide us with greater flexibility in script development. Custom CheckPoints offer an easier and highly flexible way of construction your object verifications, which is a core concept of test automation. The concepts below, when coupled together can help you build extremely robust scripts, with enough information that your user desires.

Recovery Scenario Test Run Error: Item in list or menu not found

by Anshoo Arora October 19, 2009 98 comments

Automated tests are created mainly to be run unattended, and this raises a few concerns for automation developers. Assume a situation where you initiated your test-suite while leaving your office to be run over-night. However, because of unforeseen errors, your test stops at a point and disrupts your results.

QTP: Working with Multiple Browser Applications (Revised)

by Anshoo Arora October 19, 2009 32 comments

Web applications due to their dynamic nature, make script development quite challenging. I am writing this article in an attempt to simplify one of its aspects that automation developers face while working with Web applications. We will see how it can be made extremely easy to work with multiple browsers with the use of a Dictionary object, to which we can add Browsers, remove them, change the way we reference them and much more.

QTP Siebel Error: Test Execution halts when a SiebButton is clicked

by Anshoo Arora October 15, 2009 9 comments

We had an issue with one of the SiebButton objects’ in our environment. When we executed a statement to click on this particular SiebButton, the next statement would not execute. What happens is, as we click this particular SiebButton, a Dialog box pops up immediately. For some reason that we have not been able to figure out, the execution marker from the SiebButton(“”).Click statement will not move to the next line.

QTP: Creating a Highly Efficient Test-Data Dictionary

by Anshoo Arora October 8, 2009 72 comments

This article describes how the management of test data can be greatly simplified with the help of ADO and the Dictionary Object. This concept shows how your data-pool needs to be accessed only once to create a highly efficient and fast-performing data-dictionary. Examples and Demos included.

Custom View Options for QTP’s Expert-View Editor

by Anshoo Arora October 1, 2009 15 comments

Today, after being quite tired of switching windows between Notepad++ and QTP, I started experimenting with different layouts I can create to make the the QuickTest editor a little more viewing-friendly. After a few minutes of playing around, I finally have something that I like.

Upcoming: Automation Framework

by Anshoo Arora September 29, 2009 58 comments

I have been planning for a while now to release a framework for our community. I even started on a few ideas, but I felt it would be best if I received some feedback from you guys. Please use the comment section of this post to share your ideas of what you would like to see included in the framework.

QTP: Creating Object Descriptions “On The Fly”

by Anshoo Arora September 27, 2009 12 comments

This article outlines how and when descriptions can be created at run-time to minimize code, and ease maintenance. Examples and Demos included.

QTP: Working with Large Object Hierarchies (Siebel Objects)

by Anshoo Arora September 17, 2009 22 comments

This article demonstrates how working with large object hierarchies (like Siebel’s) can be greatly simplified in QTP by using one of the 4 techniques mentioned here.

QTP: Understanding the Description Object (Description.Create)

by Anshoo Arora September 6, 2009 144 comments

This article covers the principles of creating a Description Object in QTP and its amazing use with the ChildObjects method. We will see how we can create an object description with a single property, with multiple properties, by using regular expressions and finally putting all these concepts into their application with the ChildObjects method.

QTP: Create Test Archives

by Anshoo Arora August 27, 2009 0 comments

This post explains how to create test archives elegantly and quickly and store all run-time files with a date and time stamp.

QTP: Working with Multiple Browser Applications – A Concept

by Anshoo Arora August 24, 2009 0 comments

This article demonstrates an elegant approach to working with multiple Browsers through the use of Classes and Dictionary Object. Examples included.

QTP 9.2: Delay Using CreationTime:=0 With 1 Open Browser

by Anshoo Arora August 24, 2009 8 comments

This article outlines how one can avoid the 10-15 delay with QTP 9.2 with 1 open browser.

QTP DOTNetFactory (6): Adding a RadioButton Control

by Anshoo Arora August 19, 2009 11 comments

Like the previous article, this will also be a little fast-paced and will cover how to create a Custom form and add a RadioButton control to it.

QTP DOTNetFactory (5): Creating a Custom Form with Multiple Objects

by Anshoo Arora August 14, 2009 8 comments

In this article, we will see how we can add and use multiple objects in a user form. It will cover the concepts discussed in the previous 4 articles.

QTP DOTNetFactory (4): Adding a CheckBox Control

by Anshoo Arora August 14, 2009 4 comments

This article will cover the basics of DOTNetFactory with QTP and demonstrate the technique of adding a CheckBox Control to a Custom Form.

QTP DOTNetFactory (3): Adding a Button Control

by Anshoo Arora August 14, 2009 8 comments

This article will cover the basics of DOTNetFactory with QTP and demonstrate the technique of adding a Button Control to a Custom Form.

QTP DOTNetFactory (2): Adding a Text Box Control

by Anshoo Arora August 14, 2009 9 comments

This article will cover the basics of DOTNetFactory with QTP and demonstrate the technique of adding a TextBox Control to a Custom Form.

QTP DOTNetFactory (1): Creating a Custom Form

by Anshoo Arora August 13, 2009 17 comments

In this series of articles, we will discover how to use the DOTNetFactory to create a user form and how to add different object types to it.

QTP: Using VBScript Classes as Test Modules I

by Anshoo Arora August 12, 2009 51 comments

Usage of modular classes helps in keeping all methods and properties for a module intact, and if done correctly, this can simply maintenance greatly.

Descriptive Programming (DP) vs Object Repository (OR)

by Anshoo Arora August 10, 2009 58 comments

This article compares the uses of Descriptive Programming vs Object Repository in QTP.

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

by Anshoo Arora August 10, 2009 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:

QTP: Verify Multiple Object Properties – An Elegant Approach

by Anshoo Arora August 10, 2009 31 comments

This article discusses an elegant way of multiple cross-checking expected vs actual properties of objects.

QTP: Synchronization for AJAX Applications

by Anshoo Arora August 10, 2009 27 comments

This article shows a technique that can be used to synchronize QTP with AJAX applications.

Descriptive Programming (DP) – 4 (Creating a Test Script)

by Anshoo Arora August 10, 2009 113 comments

This is the 4th article in the series and will show how DP can be used to create a test module in QTP.

Descriptive Programming (DP) Concepts – 3 (Ordinal Identifiers)

by Anshoo Arora August 10, 2009 74 comments

This article outlines the concepts of Ordinal Identifiers used in QTP. We will also create a simple test module (step by step) for a login process using only Descriptive Programming (DP).

Descriptive Programming (DP) Concepts – 2 (Regular Expressions)

by Anshoo Arora August 10, 2009 69 comments

This topic provides an excellent introduction to Regular Expressions with DP in QTP. It also discusses the famous wild card character in detail.

Descriptive Programming (DP) Concepts – 1

by Anshoo Arora August 10, 2009 128 comments

Descriptive programming has become the technique of choice for many QTP test developers. This topic provides an excellent introduction to DP with QTP.

QTP: Closing Multiple Browser Windows

by Anshoo Arora August 10, 2009 48 comments

This article outlines a few techniques to close Internet Explorer (IE) browsers in QTP (Closing browser techniques).

QTP: Get Object Count

by Anshoo Arora August 10, 2009 27 comments

This article outlines an easy way to retrieve object count when working with QTP. It can be used to include and exclude hidden objects in the page, to retrieve only the visible object count.

Retrieve Server Response using XMLHTTP

by Anshoo Arora August 10, 2009 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.

Inheritance in VB.NET

by Anshoo Arora August 10, 2009 1 comment

In OOP, Class Inheritance has been one of the most important topics and it has been around since 1967. The idea behind class inheritance is to enable the inheriting (derived) classes use attributes of the base classes. This enables programmers to reuse the code by having derived classes share the functionality of their base classes [...]

QTP: Working with SiebCalculator

by Anshoo Arora August 10, 2009 0 comments

This is the 4th article in the Siebel series. In this article, we will detail an effective way to work with the Siebalculator Object using QTP. Examples included.

QTP: Working with SiebList

by Anshoo Arora August 10, 2009 4 comments

This article introduces the SiebList object in a QTP and Siebel Environment, and demonstrates some methods that can help in working with a SiebList like an expert.

QTP: Working with SiebPickLists

by Anshoo Arora August 10, 2009 3 comments

This article introduces the SiebPickList object in a QTP and Siebel Environment, and demonstrates some methods that can be performed to enhance working capabilities in Siebel.

QTP: Working with Siebel – An Introduction

by Anshoo Arora August 9, 2009 44 comments

This article introduces the Siebel add-in with QTP and outlines various techniques to work with Siebel objects. It also offers an excellent introduction to the Siebel automation process with QTP.

Interfaces in VB.NET – An Example

by Anshoo Arora August 9, 2009 8 comments

I’m sure you’re aware of Classes, which on a high-level are user-defined types, and their instances are objects. Vb.NET has introduced a new type, called an Interface. An Interface, according to this article by Nick Harrison, “is a contract that defines the signature of some piece of functionality”. This contract is fulfilled by the Implementing [...]

Search Web Object – Simplified

by Anshoo Arora August 8, 2009 8 comments

The IsObjectFound class implements the search function for the specified web object and returns true if a visible instance is found. Considers Visible and Hidden Objects.