Search:     Advanced search

Changing the SetContext Value in Multiple Scripts

Article ID: 790  |  Last updated: 23 Dec, 2014

The SetContext statement contains the application and version to connect to in the application repository. You may need to change scripts if they need to use a different application or version in the repository.

Because QA Wizard Pro scripts are text based, you can search for and replace the SetContext value outside of QA Wizard Pro. This is helpful when you need to change the value in several scripts.

Use the following methods to search for and replace text in scripts:

  • Enter the following command at the Windows command prompt to generate a list of scripts that contain a specific text string:
    for %f in (*.qawscript) do find "SetContextValue" %f

    This command looks for all .qawscript files in the current directory that contain a specified text string. For example, the following command returns the names of all .qawscript files that contain the "WysiCorp Site/1.0" text string:
    for %f in (*.qawscript) do find " WysiCorp Site/1.0" %f

    You can then manually update the SetContext value in the scripts displayed in the list.
  • Use a text search and replace utility. Many freeware and shareware utilities are available on the web.
  • Write a Perl script that automates the search and replace process.

Article ID: 790  |   Last updated: 23 Dec, 2014
SetContext value update multiple scripts

Prev   Next
Workspace Conversion     Windows Server 2003 Local Administrators Cannot Install QA...