Recording a test with Google Chrome Device Mode

You can use the Google Chrome Device Mode feature to emulate tests of web applications on mobile devices.

Before you begin

Read and been familiar with the following tasks:

About this task

You can enable the Device Mode feature in Google Chrome to use it as a browser on a mobile device. Then, you can record a Web UI test using one of the devices listed in Google Chrome. The test is recorded as though it was recorded on the device and later, when you run the test, the test runs as though it is run on the device.

Procedure

  1. Start a new Web UI recording with the Google Chrome browser. Alternatively, you can record the test by using a running instance of Chrome.
  2. In Chrome, configure the Chrome Device Mode feature to emulate a particular mobile device.
    1. Select More Tools > Developer Tools by clicking the menu in the upper-right corner of the Google Chrome window.

      Developer tools menu

      You can also open Chrome Developer Tools by pressing the Cntl+Shift+I keys or the F12 key (Windows only).

    2. Click the Toggle device toolbar button.

      Toggle device toolbar

    3. Select the device that you want to emulate from the Responsive menu.
      For example, select iPhone 6. Also, ensure that the zoom level is set to 100%.

      Responsive menu

  3. Load the web application under test to allow it to adjust and perform according to the device mode that is selected.
  4. Continue to record the test.