preload

How to select random list item (QTP, VBScript)

Posted by Albert Gareev on Nov 24, 2011
0
Description  Get object reference. Get total number of items in the list. Generate an index within the given range. Select item by index. Implementation Dim objPage, objList Dim boolRC Dim intItemsCount, intRndItem 'Assumptions: ' "Google Advanced Search" page is up ' "Results per page" WebList exists and enabled 'Get page object Set objPage = Browser("CreationTime:=0").Page("title:=Google Advanced ...

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 – Handling Web Browser (3)

Posted by Albert Gareev on Nov 17, 2010
0
Parent page: GUI Recognition with TestComplete Close, minimize, maximize, move, resize browser window Description A WebForm (Page, Frame, table, etc.) can not be operated same way as window. The first thing function does is iterating upwards the hierarchy to access Process object, which is used to retrieve browser window reference. In the example presented, IEFrame property [...] ...

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.   Dim IEProcess, IExplore   Dim PropNames, PropValues   Dim [...] ...

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 [...] ...

TestComplete – Handling Web Browser (2)

Posted by Albert Gareev on Oct 14, 2010
1
Parent page: GUI Recognition with TestComplete Close all browser windows Description In the example presented, Internet Explorer browser program (executable name) is hard-coded (as “iexplore”). Closing begins from first instance number (i.e. a sequential number of the process in memory, if a few were loaded). In first attempt, .Close method is used, which allows an application [...] ...

TestComplete – Handling Web Browser (1)

Posted by Albert Gareev on Oct 12, 2010
0
Parent page: GUI Recognition with TestComplete Close single browser window Description In the example presented, Internet Explorer browser program (executable name) is hard-coded (as “iexplore”). Instance number (i.e. a sequential number of the process in memory, if a few were loaded), is parameterized. In first attempt, .Close method is used, which allows an application to finalize. Second [...] ...

Taking snapshot of a folder structure

Posted by Albert Gareev on Jul 08, 2010
0
In the Checking structure of created folders example I used a text file as a source, containing manually prepared folder names to check for. Today I want to show how file/folder structure could be captured automatically. Data Record Declaration For this example, data will be stored in Dictionary object serving as a dynamic array of records. Sample file [...] ...

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 [...] ...

Active Directory Scripting – a little trick for ...

Posted by Albert Gareev on Apr 13, 2010
2
Reference page: Active Directory – Sample Scripts (Excel/VBA)  While processing User Account put the following code in the beginning of operations to disable it. 'Disable user account. objUser.AccountDisabled = True 'Save info On Error Resume Next objUser.SetInfo boolRC = (Err.Number <> 0) On Error GoTo 0 If boolRC Then 'recovery code End If And enable [...] ...

Active Directory Scripting – Security Group ...

Posted by Albert Gareev on Mar 11, 2010
0
Reference page: Active Directory – Sample Scripts (Excel/VBA)  Description  The function below is used to clear group membership for a user account. The account is removed from all groups except recognized ones . By default, “Users” and “Domain Users” are in the list. The function can be easily modifed to recognize and process membership based on [...] ...

Active Directory Scripting – find User Account

Posted by Albert Gareev on Mar 09, 2010
0
  Reference page: Active Directory – Sample Scripts (Excel/VBA)  Description  The function below performs 1-layer deep search of User Account object in all Organizational Units contained under parent Organizational Unit. The function can be easily modified for a recursive search if children OU hierarchy is unknown. Use objUser.Get(“distinguishedName”) to retrieve full LDAP path of found [...] ...

How to manually get Dexterity GUI field names

Posted by Albert Gareev on Mar 04, 2010
2
All related posts: Reference Page – GP/QTP Automation Question The question was asked here. I need to make a small change in xml file created without re-mapping a window. How can I manually get Dexterity GUI field names from GP? Answer You can do that by accessing “Tools\Resource Descriptions\Windows” item of main menu of any Dexterity Window. [...] ...

Active Directory Scripting – modify Attributes

Posted by Albert Gareev on Mar 01, 2010
0
Reference page: Active Directory – Sample Scripts (Excel/VBA) How to modify Attributes of an Object Introduction In Microsoft Active Directory Object Classes have Attributes representing additional information about an object. It could be Firstname, Lastname – for a person, Address and Phone number both for a person and organization. Access to Attributes is performed through LDAP calls, [...] ...
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.