Loading the GUI Map File - WinRunner

When WinRunner learns the objects in an application, it stores the information in a GUI map file. In order for WinRunner to use a GUI map file to locate objects in your application, you must load it into the GUI map. You must load the appropriate GUI map files before you run tests on your application being tested.

You can load GUI map files in one of two ways:

  • using the GUI_load function
  • from the GUI Map Editor

You can view a loaded GUI map file in the GUI Map Editor.A loaded file is indicated by the letter “L” and a number preceding the file name.You can also open the GUI map file for editing without loading it.

Loading GUI Map Files Using the GUI_load Function

The GUI_loadstatement loads any GUI map file you specify.Although the GUI map may contain one or more GUI map files, you can load only one GUI map file at a time. To load several files, use a separate statement for each.You can insert the GUI_load statement at the beginning of any test, but it is preferable to place it in your startup test. In this way, GUI map files are loaded automatically each time you start WinRunner. For more information, see, “Initializing Special Configurations.”

To load a file using GUI_load:

  1. Choose File Open to open the test from which you want to load the file.
  2. In the test script, type the GUI_load statement as follows, or click the GUI_load function in the Function Generator and browse to or type in the file path:
  3. GUI_load (file_name_full_path);

    For example:

    GUI_load ("c:\qa\flights.gui");

    See “Generating Functions,” for information on how to use the Function Generator.

  4. Run the test to load the file. See, “Understanding Test Runs,” for more information.

Loading GUI Map Files Using the GUI Map Editor

You can load a GUI map file manually from the file system or from a TestDirector database, using the GUI Map Editor.

To load a GUI map file from the file system using the GUI Map Editor:

  1. Choose Tools GUI Map Editor. The GUI Map Editor opens.
  2. Choose View GUI Files.
  3. Choose FileOpen.
  4. In the Open GUI File dialog box, select a GUI map file.
  5. To load a GUI map file from the file system using the GUI Map Editor

    Note that by default, the file is loaded into the GUI map. If you only want to edit the GUI map file, click Open for Editing Only. See, “Editing the GUI Map,” for information about editing the GUI map file.

  6. Click Open. The GUI map file is added to the GUI file list. The letter “L” and a number preceding the file name indicates that the file has been loaded.

To load a GUI map file from a TestDirector database using the GUI Map Editor:

  1. Choose Tools GUI Map Editor to open the GUI Map Editor.
  2. Choose FileOpen.
  3. The Open GUI File from TestDirector Project dialog box opens. All the GUI map files that have been saved to the selected database are listed in the dialog box.

    To load a GUI map file from the file system using the GUI Map Editor

  4. Select a GUI map file from the list of GUI map files in the selected database. The name of the GUI map file appears in the File name text box.
  5. To load the GUI map file into the GUI Map Editor, make sure the Load into the GUI Map default setting is selected.Alternatively,if you only want to edit the GUI map file, click Open For Editing Only.For more information, see, “Editing the GUI Map.”

  6. Click Opento open the GUI map file. The GUI map file is added to the GUI file list. The letter “L” indicates that the file is loaded.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics