Recording a Web UI test

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

Before you begin

  • When recording a test, wait for each page to load completely. This waiting time does not affect performance results because you can remove extra waiting time (think time) when you play back the test.
  • Do not change any browser preferences, including JavaScript settings. JavaScript should be enabled to record and play back Web UI scripts in a browser.
  • Ensure that you have manually enabled the Safari browser for recording Web UI tests. For instructions, see Enabling the Apple Safari browser to perform Web UI tests on macOS.
  • To be able to record a test with Safari, some changes are required:
    • In Safari, click the Develop menu and select Allow Remote Automation.
    • When the tool starts the Safari browser for recording a test and you enter the application URL, you are prompted with a dialog box. To proceed with the recording of the test, click on Stop Session.
  • To record and play back a test with the Mozilla Firefox, Microsoft Edge, and Google Chrome browsers on the Mac operating system, ensure that you have installed the browsers at the default location /Applications.
  • For Microsoft® Internet Explorer® 9 or later:
    • To ensure that the browser always loads the web pages in standard mode, add <!DOCTYPE html> at the beginning of the HTML source of the pages.
    • To prevent the application from running on a compatibility mode internally, in Internet Explorer, click Tools > Compatibility View Settings and clear all of the check boxes.
    • If you are recording the test with Internet Explorer 11 for the first time, you have to manually enable the Rational® Functional Tester extension in the browser. To enable the extension, click Enable on the pop-up that appears the first time you start Internet Explorer after installing Rational® Functional Tester. You can also open Internet Explorer and click Tools > Manage add-ons. Then, select RtwIEBhoWithJS Class and click the Enable button.
  • To record a test that emulates a web application on a mobile device, see Recording a test with Google Chrome Device Mode.
  • To record a test on Mozilla® Firefox® browser 54 or later:
    • Install the Web UI browser extension for Firefox® 57, see Enabling Mozilla Firefox for Web UI testing for details. This new recommended web extension style is supported from Firefox® 54 and later.
    • In the Recorder Settings dialog, check the Use an alternate Firefox profile option and select a user profile that is associated to the extension plug-in.

    Before running the Firefox® browser, it is recommended to clear the Firefox® cache. This procedure allows you to run the enabled Firefox® recorder browser extension and to record successful tests.

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.
  2. Click Create a test from a new recording. Select Web UI Test or Create a test from an existing recording, and select a recording session. If you are recording sensitive data, click Recording Encryption Level and select the encryption level to record.
  3. Optional: If you did not create a test project earlier, click the Create the parent folder icon Create the parent folder to create a test project. For more information, see Creating a Test Workbench project.
  4. Type a name for the test.
  5. To correlate the test data by using automatic data correlation, select Customize automatic data correlation.
    This option is useful only if you are generating a HTTP test from the Web UI recession file and want to apply data correlation to the HTTP test. Data correlation is not supported for a Web UI test. Click Next.
  6. In the Select Client Application page, select the web browser to use and click Next.
    The type of application defines the recorder that can be used. The following client application types are supported for recording a Web UI test:
    • Google Chrome
    • Mozilla Firefox
    • Microsoft Internet Explorer version 9 and later
    • Apple Safari
    • Microsoft Edge
  7. In the Recorder Settings dialog, set the recording preferences depending on the browser you selected:
    • 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. Select The server requires a specific client certificate.

      To provide single certificate keystore, specify the file name and password of the server certificate keystore. If multiple certificates are required, click Multiple certificates, and click Add to specify a certificate keystore file name and password for each host name and port.

    • If you selected Mozilla Firefox, you can choose to use a temporary Firefox® profile. This option starts Firefox® without any bookmarks, plug-ins, or toolbars that might be associated with your usual profile. Select Use an alternate Firefox profile, and then select Use a temporary Firefox profile.
    • If you record a test with the web browser extension that is recommended for Firefox® 57, select a user profile that is associated with the installed extension plug-in. Once this option checked, the web recorder runs the Firefox® web extension to record the test.
    • To also include the HTTP traffic in the Web UI recording, click Advanced and then click Also record HTTP traffic. By using this option, you can later generate HTTP tests (in addition to the Web UI tests) from the recording.

      The option is enabled by default. To disable it, click change default value. In the Preferences dialog, clear Also record HTTP traffic, click Apply and click OK.

    • Click Advanced 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.
  8. Click Finish.
    The Welcome page opens. The page displays the version of the web browser that is launched and also the list of web applications that were added in the instructions provided on the page before proceeding.
  9. 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.
  10. 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.
  11. In the Data Correlation and Transformation page, set the data correlation options as appropriate and click Finish.

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.