6. Record a Test

Applies to TestComplete 15.55, last modified on September 12, 2023
Note: Do not switch to the TestComplete help during the recording. The recording engine traces and records all user actions, so the recorded test will contain commands that simulate “switching”.

To see the instructions, you can print them before starting the record. Or, if you have two monitors, you can move the TestComplete help system window to the other monitor.

  1. Wait until the selected web browser starts and navigates to the main page of the SmartStore application:

    Getting Started with TestComplete (Web): SmartStore main page

    Click the image to enlarge it.

    If the browser does not, you can launch it and open the needed web page manually.

    TestComplete records the start of the web browser using a special test command. You will see this command later when we analyze the recorded test.

  2. Click in the Search text box and type ball:

    Getting Started with TestComplete (Web): Type 'ball' in the Search box

    Click the image to enlarge it.

  3. In the search results, find the Official game ball item and click it:

    Getting Started with TestComplete (Web): Select Official game ball item

    Click the image to enlarge it.

  4. The application will open the selected item page:

    Getting Started with TestComplete (Web): Official game ball item page

    Click the image to enlarge it.

  5. On the page, select the item color: blue, and the item size: 3:

    Getting Started with TestComplete (Web): Select item color and size

    Click the image to enlarge it.

  6. Click Add to cart:

    Getting Started with TestComplete (Web): Click Add to cart

    Click the image to enlarge it.

  7. The application will show you your Shopping Cart with the item added to it:

    Getting Started with TestComplete (Web): The item has been added to the Shopping Cart

    Click the image to enlarge it.

  8. Insert a comparison command into our test. It will verify that the Shopping Cart contains an item with the selected features - color: blue, and size: 3.

    We call the comparison commands checkpoints. TestComplete offers various types of checkpoints that are suitable for verifying different types of data (see Checkpoints). One of the most frequently used checkpoints is a Property checkpoint. It is used to check data of application controls. We will use this checkpoint in our tutorial.

    To create a property checkpoint, you can use the Create Checkpoint wizard, or you can create a Quick Checkpoint. In this tutorial, we will demonstrate how to create Quick Checkpoints:

    • Click on the Recording toolbar and make sure that Quick Checkpoints are enabled:

      Getting Started with TestComplete (Web): Enabling Quick Checkpoints
    • Move the mouse pointer to the Color: Blue, Size:3 line. TestComplete will highlight it with a red frame. Wait until the icon becomes opaque and move the mouse pointer to the icon. TestComplete will show the most commonly used properties for which you can create Quick Checkpoints:

      Getting Started with TestComplete (Web): Select the object to check
    • In the list, select the contentText property:

      Getting Started with TestComplete (Web): contentText property

      The property provides access to the text that the selected web element shows. The property is browser-independent. That is, it works in the same way in all the supported web browsers, which helps you avoid problems when playing back your tests in various browsers.

    • TestComplete will append the checkpoint command to the recorded test and show a notification about it.

    • You can continue recording user actions.

  9. Click the Delete button next to the item to clear the Shopping Cart:

    Getting Started with TestComplete (Web): Clear the Shopping Cart

    Click the image to enlarge it.

  10. Close the web browser by clicking the X button on its caption bar.

  11. Press Stop on the Recording toolbar to stop the recording. TestComplete will process the recorded test commands and save them to a test.

Prev     Next

See Also

About Tested Web Page
Recording Automated Tests
About Property Checkpoints

Highlight search results