Quick questions – quick answers

Posted by Albert Gareev on Jun 22, 2010 | Categories: How toNotes

Quick Answers

Quick answers to questions arrived into my blog recently.

How to load GUI map in QTP during run-time?

Use methods of RepositoriesCollection object: Find / Add / Remove. See sample code, read investigation results.

What’s the name of add-in for MS Dynamics Great Plains automation?

There is no specific add-in. You would need Dot NET and Visual Age add-ins to create your own.

How to restore/resize minimized browser window?

You need to retrieve handle of a browser window, then operate the window with standard functions. See sample code (Objective 1 chapter in the article).

How to copy folder with subfolders and files on it?

You can use XCopy.exe or other command line tool. See sample code.

How to create and edit Great Plains Dexterity macros?

  1. Enable Advanced macro menu (will appear as Tools/Macro/Advanced) by setting ShowAdvancedMacroMenu=TRUE in Dexterity configuration file Dex.ini.
  2. Use Record and Pause commands in Advanced macro menu to create your scripts. Scripts are saved as *.mac files. You can edit source code manually in any text editor.
  3. Refer to documentation page to see descriptions for macro commands and operators.


How to enable execution log for  Great Plains Dexterity scripts?

Use logging command. Example: Logging file ‘:c:GP/Log/maclog.txt’
Note non Windows-like syntax.

How to use data from the manually opened Excel file in automation script ?

Manually opened Excel workbook is locked. Editing test data while test execution scripts try using then might mess-up test results. But you can try waiting for a short period of time, then duplicating the file, if uninterruptible execution is required. See sample code.

What is Dictionary object in QTP?

Dictionary is a standard Microsoft object that stores data in key, item pairs.

  • You can use Dictionary object as an associative array
  • You can use Dictionary object as a dynamic array
  • You can use Dictionary object to support optional and default parameters for VBScript functions
  • You can use Dictionary object to implement local / global data model in your scripts
  • You can use Dictionary object as a container for parameters you pass in/out in QTP Actions


and here’s the related function library.

  • Leave a Reply

    * Required
    ** Your Email is never shared

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.