Recording a Login with Chrome DevTools

The Chrome DevTools Recorder is a tool in Google Chrome that records the actions you perform on a web page, such as clicks and typing, and saves them as a JSON file. You can upload this file to Bright as a Recorded Browser-Based Form Authentication flow. Bright replays the recorded steps to log in to your application.

Use the Chrome DevTools Recorder as an alternative to the built-in Authentication Recorder.

Opening the Recorder

  1. Open Google Chrome in Incognito mode. This prevents Chrome from using cached data or an existing login session, so the recording contains the complete login.

  2. Right-click anywhere on the web page and select Inspect. Alternatively, click the three dots icon at the top-right corner of Chrome, go to More tools, and select Developer tools.

    📘

    Note

    You can also open DevTools with Ctrl + Shift + I on Windows and Linux, or Cmd + Option + I on Mac.

  3. In the DevTools panel, click the three dots icon, go to More tools, and select Recorder. Alternatively, open the Command Menu and run the Show Recorder command.

Recording the Login

  1. Open your login page.

  2. In the Recorder panel, click Create a new recording.

  3. Enter a name for the recording. Leave Selector attribute and Selector types to record as they are.

  4. Click Start recording.

  5. Perform the login actions on the page, for example enter the credentials and click Log in. Keep the actions to a minimum: the Recorder records every click and key press, and Bright replays all of them.

  6. Click End recording.

Verifying the Recording

To make sure that the recording is valid, replay it in Chrome:

  1. Close the Google Chrome window and reopen it in Incognito mode.

  2. Open the Recorder and select the recording you just made.

  3. Click Replay in the top-right corner of the Recorder panel.

    If you are logged in to your application, the recording is valid.

A successful replay in Chrome does not guarantee a successful login in Bright. After you upload the file, run Test authentication in Bright, as described in the next section.

Exporting and Uploading the Recording

  1. In the Recorder, select the recording and click Export at the top of the panel.
  2. Select JSON as the format and save the file. Other formats, such as Puppeteer scripts, do not work in Bright.
  3. In Bright, create an authentication object, and in the Auth Flow Setup tab select Recorded Browser-Based Form Authentication.
  4. Click Upload File (JSON) and select the file. See Recording/Uploading a New Login Session.
  5. Run Test authentication and make sure all steps are successful. See Testing Authentication.
📘

Note

The JSON file contains the values that you typed during the recording, including the password. Record the login with a dedicated test account, and do not share the file. In Bright, you can protect the fields as secrets.

What to Do Next


Did this page help you?