Open topic with navigation
Recording new scripts
Recording creates a new script and captures actions as you interact with an application. The scripts you record provide a baseline for testing. After recording, you can modify scripts to develop more complex testing scenarios.
Careful planning is the key to successful automated testing. Short, task-based scripts are easier to manage and maintain. Tests should also be repeatable and have an expected result. For example, if the test application requires logging in, record a single login script that is called at the beginning of all other scripts that run against the application. This helps ensure QA Wizard Pro captures windows and controls used when logging in so they are located when the script runs and eliminates the need for updating statements in multiple scripts if the log in process changes later. See Calling scripts from other scripts.
Keep the following in mind before recording scripts:
- Make sure the application is set up in QA Wizard Pro. See Managing Application Repositories.
- QA Wizard Pro must be installed in the default C:\Program Files or C:\Program Files (x86) directory to record scripts against Windows 8 applications. If it is installed in a different directory, an error is returned during recording.
- If you are recording a web script, disable any browser auto complete options for forms and passwords. These options can cause scripts to fail during playback because incorrect values are entered or controls cannot be found if the list of auto complete values is displayed over them.
- If you are recording a web script in Google Chrome and an error that the default port is already in use is returned, you need to update a configuration file to change the port QA Wizard Pro uses to communicate with Chrome. See Cannot Record in Chrome Because Port Already in Use for information.
- To record scripts against HTTPS web applications in Chrome, SSL encryption must be enabled. See Setting general options.
1. Choose Script > Record New Script.
The Record New Script dialog box opens.
2. Enter a Script name.
3. Select the Application you want to record against.
Click New to add an application. See Adding applications.
4. Select Connect to running application to record against an instance of a Windows application running on the test computer.
Note: This option is not available if a Windows 8 application is selected.
- Select the application from the corresponding list. Make sure the selected application is a Windows application associated with the running process. If new windows and controls are found during recording, they are added to the repository. If you do not select the right application, windows and controls are added to the wrong application in the repository.
- If you record against a running application, the application must be running on the test computer during playback or the script will fail.
5. If you are recording a web script, select a Browser.
6. Click Record.
The application starts. The Recording toolbar also opens.
You may be prompted for additional information.
- If repository variables are defined for the application version, you are prompted to enter variable values before you start recording. See Entering repository variable values during recording and playback.
- If you are recording a script in Firefox for the first time, you are prompted to install and enable the required QA Wizard Pro extension. Select Allow this installation and click Continue.
7. Navigate through the application, performing the actions you want to record.
- Click the Checkpoint Recording toolbar button to add checkpoints to the script during recording. See Creating record-time checkpoints. Click the button again to exit checkpoints mode.
- Click the Stress Recording toolbar button to add stresses to the script, such as low drive and memory space, read-only drives, and disabled networking. See Applying stresses.
- Click the Low-Level Recording toolbar button to switch to low-level recording mode. Low-level action statements perform mouse actions that QA Wizard Pro records when it does not recognize an object. See Recording low-level actions. Click the button again to exit low-level mode.
- Click the Comment Recording toolbar button to add a comment to the script. Comment statements are not run during playback.
Note: Click the Cancel Recording toolbar button to cancel recording and discard all recorded actions.
8. Click the Stop Recording toolbar button.
The Repository Changes dialog box opens. New or changed windows and controls are displayed. See Reviewing and saving repository changes.
9. Click Save to save the repository changes.
The script is processed and the actions are added to it. Information about the application windows and controls are added to the repository.
Tip: Window and controls added to the repository may have generic names depending on the application. You may want to modify the repository to make the names consistent with other objects. See Modifying window and control properties.