preload

Active Directory – Sample Scripts (Excel/VBA)

Posted by Albert Gareev on Feb 14, 2010
1
Basic Active Directory Queries How to retrieve Organizational Unit How to retrieve User Account How to retrieve Security Group   Working with Active Directory Objects How to create User Account How to create Security Group How to modify Attributes of an Object Advanced Active Directory Queries Processing Security Group Membership for User Account Search for User […] ...

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

IT Infrastructure Maintenance: Introduction

Posted by Albert Gareev on Feb 09, 2010
0
Infrastructure – the basic, underlying composition of elements and their connections that form a system. In IT “infrastructure” is a layered definition. It includes electrical and communication lines, and equipment. It includes computer and networking hardware, as well as server and operating systems software. Common use application software is also a part of infrastructure. On […] ...

How to find-replace empty cells (Excel, QTP, VBScript)

Posted by Albert Gareev on Jan 29, 2010
0
Parent page: Service Functions – Excel (QTP, VBScript) Answers Description Connect to Excel through COM – Open workbook – Open worksheet – Loop through data range – close and save the workbook. Note.  In the example below script finds empty cells and assigns zero  to them. Make sure you targeted the worksheet that you need. You can find it […] ...

How to find Excel worksheet by name (QTP, VBScript)

Posted by Albert Gareev on Jan 27, 2010
0
Parent page: Service Functions – Excel (QTP, VBScript) Answers Description Connect to Excel through COM – Open workbook – Loop through worksheets – close and save the workbook. 1. If you know Excel Worksheet name and pretty sure it exists 2. If you don’t know Excel Worksheet name exactly or not sure if it exists ...

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 add (create) Excel macro from QTP

Posted by Albert Gareev on Jan 21, 2010
0
Parent page: Service Functions – Excel (QTP, VBScript) Answers Description Connect to Excel through COM – Open workbook – Retrieve Code Module object – Add new macro string – close and save the workbook. Notes. For this example let’s assume our target Workbook is stored as “C:\Temp\1.xls”, and our target Code Module is named “Module1”. QTP/VBScript source code ...

How to enlist Excel VBA macros (QTP, VBScript)

Posted by Albert Gareev on Jan 20, 2010
1
Parent page: Service Functions – Excel (QTP, VBScript) Answers Description Connect to Excel through COM – Open workbook – Retrieve Code Module object – Retrieve Code Block string – Parse the string – close and save the workbook. Notes. For this example let’s assume our target Workbook is stored as “C:\Temp\1.xls”, and our target Code Module is named “Module1”, and ...

How to exchange parameters with Excel VBA function ...

Posted by Albert Gareev on Jan 15, 2010
0
Parent page: Service Functions – Excel (QTP, VBScript) Answers 1. To pass-in parameters to an Excel VBA function A function must be public and belong to a Macro Module. QTP/VBScript source code Excel/VBA function source code 2. To retrieve parameters from an Excel VBA function You need to reserve cells on a worksheet for that purpose. […] ...

How to call Excel VBA function from QTP

Posted by Albert Gareev on Jan 14, 2010
0
Parent page: Service Functions – Excel (QTP, VBScript) Answers Description Connect to Excel through COM – Open workbook – Invoke the function – Catch error – close and save the workbook. Notes. Macro (Sub or Function) must be public and belong to a Macro Module. ...

Service Functions – Excel (QTP, TestComplete, ...

Posted by Albert Gareev on Jan 12, 2010
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. Functions Excel File Worksheet compare (QTP, VBScript) How to check if Excel Workbook is locked A little automation for VBScript OOP (1) A little automation for […] ...

How to update value in XML file (QTP, VBScript)

Posted by Albert Gareev on Dec 30, 2009
0
Parent page: Service Functions – XML (QTP, VBScript)  Answers Description Open XML file – load into memory – locate target nodes – update (replace) values – save XML file (either under a new name or overwrite the original file). Search is performed by tag name (“target_node”). If you pass in a non-string parameter for .SetValue function, convert […] ...

How to count XML nodes (QTP, VBScript)

Posted by Albert Gareev on Dec 29, 2009
0
Parent page: Service Functions – XML (QTP, VBScript)  Answers 1. How to count all direct children? 2. How to count all direct children, specific name tag? 3. How to count all descendants? References Read more about XPath queries. ...

GP/QTP Automation: Conclusion but not closure

Posted by Albert Gareev on Dec 28, 2009
0
GP/QTP Automation: Conclusion but not closure The main question – whether it’s possible to automate Microsoft Dynamics Great Plains application testing (OS Patch smoke tests, UAT/Regression tests) – was answered positively, and proven in the actual implementation of automated test scenarios. Tools and Technologies Standard GUI recognition method (via Windows Handle) used by UI Automation tools […] ...

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

How to use loops in Dexterity Macro

Posted by Albert Gareev on Dec 21, 2009
1
All related posts: Reference Page – GP/QTP Automation  Answer According to the documentation, there are no loop operators defined in Microsoft Dynamics Great Plains Dexterity Macros. However, the macro language provides other commands to workaround the issues in the most required cases. Workarounds 1. Capture values of GUI fields (in a loop) Use DumpFieldBegin…DumpFieldEnd commands. 2. Window synchronization […] ...

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

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

XSL introduction and references

Posted by Albert Gareev on Nov 30, 2009
1
Parent page: Service Functions – XML (QTP, VBScript)  What is XSL? The Extensible Stylesheet Language. An XSL script is a set of transformation instructions used by an engine (often, web browser, but could be any other processing program as well) to produce a new document based on XML input document. The original document remains unchanged. The output document […] ...

XPath introduction and references

Posted by Albert Gareev on Nov 23, 2009
0
Parent page: Service Functions – XML (QTP, VBScript)  Note. Although there could be no “reusable function” that would construct XPath for you, I store current post under “XML Service Functions” category, as it’s closely related to it. XPath is fairly simple to learn and very powerful in use.  You can use free XPath Designer Tool to validate […] ...

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”. ...
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.