Posted by Albert Gareev on May 03, 2010
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 […] ...
Posted by Albert Gareev on Apr 29, 2010
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 […] ...
Posted by Albert Gareev on Apr 13, 2010
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 […] ...
Posted by Albert Gareev on Mar 18, 2010
Quick Test Professional provides 2 ways of referring to GUI objects while creating testing scripts. Have you ever tested performance of either one? ...
Posted by Albert Gareev on Mar 11, 2010
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 […] ...
Posted by Albert Gareev on Mar 09, 2010
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 […] ...
Posted by Albert Gareev on Mar 01, 2010
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, […] ...
Posted by Albert Gareev on Feb 18, 2010
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 […] ...
Posted by Albert Gareev on Feb 16, 2010
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 […] ...
Posted by Albert Gareev on Feb 12, 2010
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 […] ...
Posted by Albert Gareev on Feb 11, 2010
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 […] ...
Posted by Albert Gareev on Feb 10, 2010
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 […] ...
Posted by Albert Gareev on Dec 23, 2009
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 […] ...
Posted by Albert Gareev on Dec 09, 2009
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, […] ...
Posted by Albert Gareev on Dec 07, 2009
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 […] ...
Posted by Albert Gareev on Dec 03, 2009
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. […] ...
Posted by Albert Gareev on Dec 02, 2009
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 […] ...
Posted by Albert Gareev on Nov 19, 2009
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 […] ...
Posted by Albert Gareev on Nov 15, 2009
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. ...
Posted by Albert Gareev on Nov 14, 2009
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”. ...
Posted by Albert Gareev on Oct 26, 2009
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 […] ...
Posted by Albert Gareev on Oct 12, 2009
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 […] ...
Posted by Albert Gareev on Sep 25, 2009
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: ...
Posted by Albert Gareev on Sep 23, 2009
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 […] ...
Posted by Albert Gareev on Sep 21, 2009
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 […] ...
Posted by Albert Gareev on Sep 09, 2009
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) ...
Posted by Albert Gareev on Aug 20, 2009
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) ...
Posted by Albert Gareev on Aug 18, 2009
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 […] ...
Posted by Albert Gareev on Jul 21, 2009
Parent page: Service Functions – XML (QTP, VBScript) Description Retrieves child comment node from comments collection and returns comment text as string. ...
Posted by Albert Gareev on Jul 17, 2009
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. ...