micPass = 0 micFail = 1 micDone = 2 micWarning = 3 micInfo = 4
Category Archive: QTips
Nov 11 2015
Feb 20 2014
The following function accepts an array as input parameter and returns true if the array is empty or false otherwise. Function IsArrayEmpty(ByVal arr) If Len(Join(arr,"")) = 0 Then IsArrayEmpty = True Else IsArrayEmpty = False End If End Function
Feb 06 2014
Being able to know whether the current web page has a horizontal or vertical scrollbar (or both) can be handy. The following function GetScrollbarState accepts two arguments: The document (i.e., Browser(“MyBrowser”).Page(“MyPage”).Object) The direction of the scrollbar – “h” for horizontal or “v”” for vertical. And returns true if there is a scrollbar in the given …
Jan 20 2014
The following function yields tremendous code savings, as it can evaluate any comparison between a pair of values (e.g., observed vs. expected) in a generic fashion. It accepts three (3) arguments: 1. sOperator – The logical binary operator, such as ‘=’ (equals), ‘=>’ (greater than or equal to), etc. 2. sObserved – A variant value. …
Apr 08 2013
To set the comment property of a test object: obj.SetTOProperty “miccommentproperty”, Now() To retrieve the comment property of a test object: Print obj.GetTOProperty(“miccommentproperty”) * Special thanks to Marc Miedema for providing the basis for this post through our AdvancedQTP LinkedIn Group. Thanks also to Brian Colcord who originally raised the question. Join the forum discussion on this post
Oct 05 2012
In a previous article we have seen how to decrypt an encrypted password. In this brief post we shall see how to block such possibility to ensure passwords are secure within the scope of automation.
Oct 01 2012
When we enter a password to a WebEdit the input string is encrypted. This short article suggests a method to easily decrypt a given encrypted password automatically.
Aug 25 2012
In a previous article we touched upon the subject of Test Objects in QTP. To briefly summarize, Test Objects provide access to Runtime Objects (the actual objects in the AUT) and thus enable us to manipulate the AUT’s GUI and retrieve data from it, much like a human user. Basically a Test Object uses a description …
Aug 16 2012
Sometimes one needs to produce a list of files in a directory hierarchy. Here is one possible solution that uses a recursive subroutine.
Sep 02 2009
This is a revised version of a previous QTip that suggested a function to find a file deep-down a folder hierarchy starting from a known folder as root. The current implementation is much simpler to understand and robust. Please note that the function uses recursion. Enjoy! 1: ‘———————————————————————– 2: Public Function FindFileRecursively(ByVal strRootFolder, ByVal strFilename) …