preload

How to find all links on a web page (TestComplete)

Posted by Albert Gareev on Dec 15, 2012
0
Description Get parent object reference. In the example given, it’s a browser process, but you can narrow it down to a page or a web container object (table,  div, etc.). Use FindAllChildren to retrieve array of links. – You can limit search depth according to your context. – You may want to do filtered search using […] ...

TestComplete Forms – Using Custom Events

Posted by Albert Gareev on Apr 17, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). […] ...

TestComplete – “UserName/Password” Form

Posted by Albert Gareev on Apr 16, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). […] ...

TestComplete – Using ‘File Open’ ...

Posted by Albert Gareev on Apr 10, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). […] ...

Adding GUI forms in TestComplete project

Posted by Albert Gareev on Apr 09, 2012
0
Parent page: Using GUI Forms in TestComplete Even though automation scripts are intended to drive the application under test there are cases when communication with tester is required. With TestComplete, we have a vast arsenal of predefined GUI controls for that (and those, acquainted with Delphi, will be pleasantly surprised by the way it’s organized). […] ...

How to find last modified file (TestComplete, QTP, ...

Posted by Albert Gareev on Jul 26, 2011
3
Reference page: Service Functions – System (QTP, VBScript) Description  Check folder exists – check folder has files. Iterate through collection of files and keep reference of the most recently modified file (its DateLastModified property is always the highest number). The remaining reference is the one that you need. In case of errors the function returns […] ...

DotNetFactory interface functions – SysProcessKill

Posted by Albert Gareev on Jan 06, 2011
0
Close/Terminate Specified Process Parent page: Service Functions – DotNetFactory (QTP, VBScript) Description Create an instance of Process object through DotNetFactory – search for local processes by name – iterate through the returned array and close one by one. First attempt – “gentle” close (via CloseMainWindow()). WaitForExit() gives a process some time to finalize, you may customize […] ...

DotNetFactory interface functions – SysProcessExists

Posted by Albert Gareev on Jan 04, 2011
0
Check If a Process Exists in Memory Parent page: Service Functions – DotNetFactory (QTP, VBScript) Description Create an instance of Process object through DotNetFactory – search for local processes by name – return result as boolean. Note. Name is case-insensitive but no wildcards supported. Implementation Examples ...

TestComplete – FindChildSync

Posted by Albert Gareev on Dec 13, 2010
0
Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. In addition to methods that immediately return a child object, if it’s available, there are others, that help finding objects that only about […] ...

TestComplete – Wait then Find

Posted by Albert Gareev on Dec 07, 2010
0
Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. In addition to methods that immediately return a child object, if it’s available, there are others, that help finding objects that only about […] ...

TestComplete – Couldn’t Find and Fine ...

Posted by Albert Gareev on Nov 23, 2010
0
Parent page: GUI Recognition with TestComplete First of all, a short note to those readers who like to rush into conclusions. This post is about a feature, not bug. Here I continue exploring TestComplete GUI recognition capabilities with code example. The previous two posts (here and here) were about Find, FindChild, and FindAllChildren methods. Today I […] ...

TestComplete – Find Child Objects

Posted by Albert Gareev on Nov 11, 2010
0
Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. Today’s post is about FindAllChildren method If proper selection of GUI recognition properties is challenge number zero for a beginner automation […] ...

TestComplete – Find Child or Find Yourself?

Posted by Albert Gareev on Nov 10, 2010
0
Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. Today’s post is about Find method We continue with example from the previous post. What happened when the script clicked on […] ...

TestComplete – Run-time GUI recognition

Posted by Albert Gareev on Nov 09, 2010
0
Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. Today’s post is about FindChild method Let’s start with the example. Note highlighted lines: this is where object recognition properties are […] ...

TestComplete – Object Recognition Properties

Posted by Albert Gareev on Oct 18, 2010
0
 “I don’t even see the code anymore; all I see now is blonde, brunette, redhead”, Cypher (Matrix the Movie) Parent page: GUI Recognition with TestComplete Unlike operators from the popular movie, automation engineer sees picture first, but has a need to get inside down to the code. In TestComplete we can do that with Object […] ...

Checking structure of created folders (Excel/VBA)

Posted by Albert Gareev on May 05, 2010
1
In the previous post I warned about possible synchronization issues while copying a complex and/or large file-folder structure. To ensure reliability of the operation performed we may verify the structure that was created. We need to answer the following questions before designing the script. Which folders and files should it verify? Which way should it […] ...

Creating folder structure from a template (Excel/VBA)

Posted by Albert Gareev on May 03, 2010
0
How to create a complex folder structure by using a template In the previous post I provided code example that creates a folder and then applies security permissions on it. However, as per requirements, user folders often come with a predefined structure of folders and some files created by default. Sure, we can write script […] ...

SetACL command line automation examples

Posted by Albert Gareev on Apr 29, 2010
0
In this post  I provide code snippets for SetACL tool command line automation.  Examples of command line instructions were taken from here. The code presented below is written in VBA for MS Excel. CreateUserFolder function can create folders on a local or network drive. After user folder is created, the function sets typical access permissions by […] ...

Processing files contained in a folder

Posted by Albert Gareev on Mar 15, 2010
1
Reference page: Service Functions – System (QTP, VBScript) Question The question was asked here. I need to check number of text files in the folder but i dont know names Answer Checking what number of files is contained in a folder is simple. More challenging tasks would be processing files based on type or name […] ...

How to check if folder exists (QTP, VBScript)

Posted by Albert Gareev on Jan 24, 2010
1
Parent page: Service Functions – System (QTP, VBScript) Use FileSystemObject.FolderExists method. Argument should be a full path string.   When to use it? Always before trying to access the folder (delete, rename, or read from) or create files in it. Note. Always release the object you created when you no longer need it. If you don’t do […] ...

How to create a unique subfolder (QTP, VBScript)

Posted by Albert Gareev on Dec 16, 2009
1
Parent page: Service Functions – System (QTP, VBScript) How to create a unique subfolder Description A subfolder is created based on the name pattern and a date-time stamp, e.g. “AccountSearch 2009-10-14 17-18-03”.  You can add extra steps and form the code as a function that returns full path of the newly created subfolder. sName – name pattern sFullPath […] ...

How to duplicate an existing file (QTP, VBScript)

Posted by Albert Gareev on Dec 15, 2009
0
Parent page: Service Functions – System (QTP, VBScript) How to duplicate an existing file (If you want to access the file but it’s locked) Description sFileName – name of the file to duplicate sNewName – name of created file (generated automatically), pass-back argument. Uses UniqueFilename function to generate a name for the duplicate file. ...

How to generate unique file name (QTP, VBScript)

Posted by Albert Gareev on Dec 14, 2009
0
Parent page: Service Functions – System (QTP, VBScript) How to generate a unique file name if the file name already exists in the given folder (That often happens, if you need to create a series of files or duplicate an existing file) Description sFileName – the “original” file name or file name template sFolderName – parent folder […] ...

Using built-in and system dialogs in QTP

Posted by Albert Gareev on Nov 19, 2009
0
Even though automated testing scripts are intended to communicate with application under test there are cases when communication with tester is required. With QTP, we can use either built-in MsgBox / InputBox functions or link standard Windows dialogs through COM. MsgBox Use this function to report information (like value of a variable) during debugging or […] ...

How to separate file name and path (QTP, VBScript)

Posted by Albert Gareev on Oct 25, 2009
2
Parent page: Service Functions – System (QTP, VBScript) Use FileSystemObject.GetFile method to obtain a File object. Argument should be a full path string. Set FSO = CreateObject(“Scripting.FileSystemObject”) Check if the file exists first. When to use it? There is a variety of utility tasks related to it: get parent folder, create another file in the same folder, create another […] ...

How to check if file exists (QTP, VBScript)

Posted by Albert Gareev on Oct 24, 2009
2
Parent page: Service Functions – System (QTP, VBScript) Use FileSystemObject.FileExists method. Argument should be a full path string.   When to use it? Always before trying to access the file (delete, rename, or read from).   Does file format matter? No. It could be text file, excel spreadsheet, bitmap, binary file, – anything. Just make sure you […] ...

Service Functions – DotNetFactory (QTP, VBScript)

Posted by Albert Gareev on Aug 05, 2009
0
In the code examples I present I often refer to routine functions. In my framework I have specialized libraries to call from.  In my blog I maintain the similar structure. Creating Custom Dialog DotNetFactory interface functions – create custom dialog  Creating DotNetFactory GUI Objects DotNetFactory interface functions (1) – Create Button DotNetFactory interface functions (2) – Create Label DotNetFactory […] ...

DotNetFactory interface functions – create ...

Posted by Albert Gareev on Jun 18, 2009
2
Parent page: Service Functions – DotNetFactory (QTP, VBScript) Used resources Service Functions – String (QTP, VBScript) Implementing optional and default parameters Create TextBox along with the Prompt Label and place on the GUI Form Create ComboBox along with the Prompt Label and place on the GUI Form Create Button, assign the event, and place on the GUI […] ...

DotNetFactory interface functions (6) – Create ...

Posted by Albert Gareev on Jun 17, 2009
0
Parent page: Service Functions – DotNetFactory (QTP, VBScript) Creating .NET objects from VBScript/QTP You can create a basic Form and assign required properties within one line by calling the function below. The function has one mandatory parameter (which though is initialized by default if empty) and a set of optional parameters provided in the Dictionary object. […] ...

DotNetFactory interface functions (5) – Create ...

Posted by Albert Gareev on Jun 16, 2009
0
Parent page: Service Functions – DotNetFactory (QTP, VBScript) Creating .NET objects from VBScript/QTP You can create a ComboBox (Dropdown Listbox/InputBox Object) and assign required properties within one line by calling the function below. The function has one mandatory parameter (list of available selection items – packed in the Dictionary object) and a set of optional parameters […] ...
Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
This work by Albert Gareev is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported.