Recording a Web UI test in Google Chrome

You create a Web UI test in the UI Test perspective. HCL OneTest UI automatically enables web browsers and configures the test environment before you start recording tests for web applications.

Before you begin

You must have completed the following tasks:

Procedure

  1. In the UI Test perspective, click New > Test From Recording.

    Alternatively, on the toolbar, click the New Test From Recording icon New Test From Recording.

    The New Test From Recording wizard is displayed.

  2. Click Create a test from a new recording in the Recording Session screen.
  3. Select Web UI Test.
  4. Click Recording Encryption Level, and then select the encryption level, if you want to encrypt sensitive data in the application.
  5. Click Next.

    The Select Location page is displayed.

  6. Click to select a folder from the parent folder list.
  7. Type a name for the test.
  8. Optional: Select Customize automatic data correlation to correlate the test data by using automatic data correlation.
    This option is useful only if you are generating a HTTP test from the Web UI recsession file and want to apply data correlation to the HTTP test. Data correlation is not supported for a Web UI test.
  9. Click Next.

    The Select Client Application page is displayed.

  10. Select Google Chrome, and then click Next.

    The Recorder Settings page is displayed.

  11. Set the following recording preferences:
    Section Option Description
    Security The server requires a specific client certificate Select this option if the server requires client SSL authentication, provide the client certificate for the proxy recorder to be authenticated by the server as though the proxy recorder were the client. Further, select one of the following options:
    • Specify a certificate keystore file name and password to provide single certificate keystore.
    • Click Multiple certificates if multiple certificates are required and specify a certificate keystore file name and password for each host name and port.
    • Click Single Smart Card if you use smart card authentication for the application under test, and provide the alias and PIN code of the smart card. The smart card alias and PIN code is part of the smart card itself and is fetched from the reader. Click Select to choose an alias.
    Select the Register the recorder root certificate authority checkbox to install the recorder certificate to record a secured site. Before the recording starts, you are prompted to install the certificate. After the recording is stopped, you are prompted to uninstall the certificate.

    Select the Keep the recorder root certificate authority after recording checkbox to avoid multiple prompts for each recording.

    Advanced Web UI recording > Private Mode(Default User profile)

    Select this option to launch the browser in private mode for recording the test.

    Web UI recording > Launch browser with arguments Select this option to specify arguments to be used when launching the browser. You can specify multiple browser launch arguments separated by a semicolon.
    Note: If you select this checkbox, the option remains selected for the subsequent test recordings. You can then clear the checkbox if required.
    HTTP Traffic > Also record HTTP traffic

    Use this option to include the performance aspect of the application in the Web UI recording session. This option is available only if both the HTTP and the Web UI extensions are installed.

    By using the Also record HTTP traffic option, you can include the HTTP traffic in the Web UI recording and later generate HTTP tests (in addition to the Web UI tests) from the recording.

    When you select Also record HTTP traffic, you can exclude traffic from specific destinations by clicking configure recording exceptions.

    You can also click change default value to specify preferred object identifiers.

    If the browser driver is incompatible, then HCL OneTest UI provides a download link to download the correct version of the driver. After you click the click here link, you can view the progress bar and relevant messages that indicate the result of the driver download process. And if the download fails, you must manually download the driver and place it in the configuration folder.

    Proxy Recorder
    Proxy Type
    • Auto
    • HTTP
    • SOCKS
    Specify whether the proxy recorder uses HTTP or SOCKS. In most cases, select Auto. Select HTTP whenever authentication or proxies are required or when your application does not support SOCKS.
    Advanced Security

    The client requires a specific server certificate

    • SSL Encryption: Override browser settings

    • Accept SSL 3.0

    • Accept TLS 1.0

    • Accept TLS 1.1

    • Accept TLS 1.2

    Select this option to specify whether to use an HTTP or SOCKS proxy recorder to review and edit network connection settings that the browser uses or to specify advanced SSL authentication settings.

    Specify advanced SSL authentication settings. If you are using the SOCKS recorder, the RptCertificate.jks certificate is used by default. Select The client requires a specific server certificate and click Add to specify the server hostname, port, certificate database path, and the certificate database password for each website that you are planning to test. If you select Generate certificate, for any IP address received by the SOCK proxy that is resolved by one the server hostnames that you listed, the SOCKS proxy uses a generated certificate signed by the RPT certificate authority, thereby ensuring a smooth recording.

    If you select Override browser settings, select Accept SSL 3.0, or Accept TLS 1.0, or both.

  12. Click Finish.
    The Welcome page is displayed with the following details:
    • Version of the web browser.
    • Web applications that you added to test.
  13. In the browser address field, type the address of the web application to test.
    Note: If you enter the address of a secure website (one that starts with https:), your browser might display a security alert. Depending on the security certificate for the site, you might be required to accept a security risk to proceed with the recording.
  14. After you finish the user tasks in the browser, stop the recorder. You can stop the recorder by closing the web application under test or by clicking the Stop icon Stop icon in the Recording Control view.
  15. In the Data Correlation and Transformation page, set the data correlation options as appropriate and click Finish.
    This page appears if you have selected the Customize automatic data correlation option.

What to do next

When the test is generated, you can edit it in the test editor. For information, see Editing Web UI tests.

To create variable data for the test, you can use the dataset candidates suggested by the workbench when you first open the generated test. For more information, see Viewing dataset candidates when you open a test.