Posted by Albert Gareev on Dec 30, 2009
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 it first by using CStr().
Set [...] ...
Posted by Albert Gareev on Dec 29, 2009
Parent page: Service Functions – XML (QTP, VBScript)
Answers
1. How to count all direct children?
Set objColl = objParent.ChildElements()
intCount = objColl.Count
2. How to count all direct children, specific name tag?
Set objColl = objParent.ChildElementsByPath("./wanted")
intCount = objColl.Count
3. How to count all descendants?
Set objColl = ...
Posted by Albert Gareev on Dec 28, 2009
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 was ineffective because [...] ...
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 is generated [...] ...
Posted by Albert Gareev on Dec 21, 2009
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
Use ActivateWindow ...
Posted by Albert Gareev on Dec 16, 2009
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 - full path of the newly [...] ...
Posted by Albert Gareev on Dec 15, 2009
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.
Public Function DuplicateFile(ByVal sFileName, ByRef sNewName)
Dim ...
Posted by Albert Gareev on Dec 14, 2009
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 (full path required)
objParameter – Dictionary object [...] ...
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, if data not [...] ...
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 value for [...] ...