preload

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. And enable it back once you’re successfully done. This way,  in case of an unhandled exception that breaks execution of a script, any User Account that wasn’t properly processed will remain […] ...

A little QTP performance test: Object Repository vs. ...

Posted by Albert Gareev on Mar 18, 2010
3
Quick Test Professional provides 2 ways of referring to GUI objects while creating testing scripts. Have you ever tested performance of either one? ...

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

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

Active Directory Scripting – create Security Group

Posted by Albert Gareev on Feb 18, 2010
1
Reference page: Active Directory – Sample Scripts (Excel/VBA) How to create Security Group Description Security Group object could be created within its container object – Organizational Unit. The example below is based on the assumption that we successfully retrieved an instance of Organizational Unit. An existing User Account will also be added to the newly […] ...

Active Directory Scripting – create User Account

Posted by Albert Gareev on Feb 16, 2010
0
Reference page: Active Directory – Sample Scripts (Excel/VBA) How to create User Account Description User Account object could be created within its container object – Organizational Unit. The example below is based on the assumption that we successfully retrieved an instance of Organizational Unit. Note. You need to login as an authorized person to successfully execute […] ...

Active Directory Scripting – retrieve Security Group

Posted by Albert Gareev on Feb 12, 2010
0
Reference page: Active Directory – Sample Scripts (Excel/VBA) How to retrieve Security Group Description Build LDAP Query – Execute Query – Catch Errors Note. You need to login as an authorized person to successfully execute the script.  Common definitions How to retrieve Active Directory Security Group (Excel/VBA source code) Note that Security Group is an object […] ...

Active Directory Scripting – retrieve User ...

Posted by Albert Gareev on Feb 11, 2010
0
Reference page: Active Directory – Sample Scripts (Excel/VBA) How to retrieve User Account Description Build LDAP Query – Execute Query – Catch Errors Note. You need to login as an authorized person to successfully execute the script.  Common definitions How to retrieve Active Directory User Account (Excel/VBA source code) Note that we enlist directory tree nodes […] ...

Active Directory Scripting – retrieve ...

Posted by Albert Gareev on Feb 10, 2010
0
Reference page: Active Directory – Sample Scripts (Excel/VBA) How to retrieve Organizational Unit Description Build LDAP Query – Execute Query – Catch Errors Note. You need to login as an authorized person to successfully execute the script.  Common definitions How to retrieve Organizational Unit (Excel/VBA source code) Note that we enlist directory tree nodes backwars when […] ...

GP/QTP Automation: Execute Dexterity Macro

Posted by Albert Gareev on Dec 23, 2009
2
All related posts: Reference Page – GP/QTP Automation  Dexterity Macro Limitation and Suggested Workaround One of the major limitations identified in Dexterity Macro System is totally hard-coded data with no functionalities to read them from any external source. To overcome this issue we can dynamically generate Dexterity macro text file from a pre-built XML template. After the file […] ...

Generating text file from XML template (QTP, VBScript)

Posted by Albert Gareev on Dec 09, 2009
1
Parent page: Service Functions – System (QTP, VBScript) Description If you need to generate text file with values you don’t know ahead you may do it dynamically, by utilizing the function below. Make sure you designed template first. The current logic is oriented to executable text files generation, like Dexterity Macro or OS Shell batch files. Code lines are data-driven, […] ...

GP/QTP Automation: Creating Dexterity Macro XML ...

Posted by Albert Gareev on Dec 07, 2009
1
All related posts: Reference Page – GP/QTP Automation  Dexterity Macro Limitation  One of the major limitations identified in Dexterity Macro System is totally hard-coded data with no functionalities to read them from any external source. Running scripts that always look for exactly the same account number or check balance on always the same date would provide a little […] ...

Text File Compare Report example (XML, XSL, HTML)

Posted by Albert Gareev on Dec 03, 2009
1
Root page: Service Functions – XML (QTP, VBScript) Parent page: XSL introduction and references Related post: Text File compare in “WDIFF” style (QTP, VBScript, XML, XSL) – Instructions and XSL script Sample task After line by line (and word by word) text file comparison has been performed, XML log was produced. Review the log, identify and report found issues. […] ...

XML verification example (XSL, HTML)

Posted by Albert Gareev on Dec 02, 2009
0
Root page: Service Functions – XML (QTP, VBScript) Parent page: XSL introduction and references Sample task Verify “transactions” xml file consisting of 10-1000 records. Only “debit” or “credit” record names are valid. Any other entries must be located and reported. Additionally, identify and report all debit records with debit amount greater than 50.00 Sample XML As you can […] ...

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

QTP-XML service functions (7) – Add processing ...

Posted by Albert Gareev on Nov 15, 2009
0
Parent page: Service Functions – XML (QTP, VBScript) Description This particular example demonstrates adding XSL call that contains instructions transforming XML tree to a web-page (HTML). Built-in QTP support for XML does not provide mapping for XML methods that operate special nodes, like Processing Instructions. It can be done through Microsoft XML DOM object. ...

QTP-XML service functions (6) – ...

Posted by Albert Gareev on Nov 14, 2009
0
Parent page: Service Functions – XML (QTP, VBScript) Description Uses .AddChildElementByName method to create a child XML node, then returns reference to the newly created object. If Parent XML node is not defined returns “Nothing”. ...

GP/QTP Automation: Highlight controls in Dexterity ...

Posted by Albert Gareev on Oct 26, 2009
0
SanScript, Visual Basic, and VBScript functions implementing the “Highlight in Application” feature as in QTP Object Repository Manager. All related posts: Reference Page – GP/QTP Automation   VBA/SanScript function – put in your Excel VBA macro file Note. Ignores sanScript errors VBScript function – put as Dexterity Interface Class method Note. If you use it as an embedded function don’t […] ...

GP/QTP Automation: GUI Capture script for Dexterity ...

Posted by Albert Gareev on Oct 12, 2009
6
A script capturing Dexterity objects (both GUI and non-GUI) contained within the window. Great Plains application is required to be up with the particular window invoked and activated. All related posts: Reference Page – GP/QTP Automation   Programming language and tool: VBScript / QTP.  The script produces an output as XML file with the structure similar to QTP object […] ...

GP/QTP Automation: interface class for Excel.VBA macro

Posted by Albert Gareev on Sep 25, 2009
0
All related posts: Reference Page – GP/QTP Automation  The following object implements interface from QTP side. Function Libary Source Code Used resources: Service Functions – String (QTP, VBScript) Declare and initialize: ...

GP/QTP Automation: Overcoming VBScript limitation with ...

Posted by Albert Gareev on Sep 23, 2009
2
All related posts: Reference Page – GP/QTP Automation   VBScript limitation  Since VBscript supports only Variant type attempts to use variable in a COM call with an argument defined as “[in, out] BSTR * “ reasonably end with “Type mismatch” error. This error is generated by the COM object itself rather then VBscript interpreter since the object gets string […] ...

GP/QTP Automation: Executing sanScript

Posted by Albert Gareev on Sep 21, 2009
0
All related posts: Reference Page – GP/QTP Automation   General concept The Application object provides only a few methods for simulation of GUI interaction required in Test Automation. However, ExecuteSanScript method allows overcoming of that limitation. The piece of sanScript code pre-written or dynamically generated could be passed-in to Microsoft Dynamics GP runtime engine, and compiled and executed […] ...

GP/QTP Automation: GUI Mapping script

Posted by Albert Gareev on Sep 09, 2009
0
All related posts: Reference Page – GP/QTP Automation   Purpose: extract object descriptions from Dexterity Dictionary and create custom XML-based GUI Map file for QTP. Used resources: Service Functions – XML (QTP, VBScript) ...

GUI object synchronization – custom function ...

Posted by Albert Gareev on Aug 20, 2009
0
Custom function implementing a more advanced synchronization point. The function will wait for the object to become existing and enabled, or to disappear (not existing). The maximum time to wait could be defined or taken by default. Used resources: Anti sleep function (QTP, VBScript, MercuryTimer, DeviceReplay) Service Functions – String (QTP, VBScript) ...

Anti sleep function (QTP, VBScript, MercuryTimer, ...

Posted by Albert Gareev on Aug 18, 2009
6
Sometimes a PC goes to sleep, launches screensaver or locks the desktop during a long synchronization periods or other GUI inactivity periods. Adding the function below makes the script periodically moving mouse to avoid breaking of the execution. Place the call to the function within your time-consuming loops and custom synchronization functions. To improve performance […] ...

QTP-XML service functions (5) – ChildCommentValue

Posted by Albert Gareev on Jul 21, 2009
0
Parent page: Service Functions – XML (QTP, VBScript) Description Retrieves child comment node from comments collection and returns comment text as string. ...

QTP-XML service functions (4) – ...

Posted by Albert Gareev on Jul 17, 2009
0
Parent page:  Service Functions – XML (QTP, VBScript)  Description Returns scalar value of the XML child attribute specified by a name. Attribute name duplication within the same node is not allowed by XML rules. If there is no attribute with the name specified then “” (empty string) is returned. ...
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.