Skip to main content

Browser states

Overview

Browser States allow you to capture a specific browser session — such as an authenticated user state — and use it as the starting point for your tests.

While Modules execute a sequence of actions to reach a desired state, Browser States snapshot the active browser session, allowing tests to begin instantly in a logged-in or otherwise pre-configured state.


Setting up the chrome extension

To capture and manage Browser States, you must use the Fore AI Chrome Extension.

  1. Open the extension and click the 'go to app.foreai.co tab' link.
  2. Once authenticated, the extension will display your account email.
  3. Navigate to the website you wish to test.
  4. Open the extension and select your Organization and Test Suite (Project).

Chrome extension setup and authentication


Creating and updating states

You can capture a new state or refresh an existing one directly from your browser.

Create a new state

  1. Log in to your application manually.
  2. Open the Fore AI Chrome Extension.
  3. Select Add new State.
  4. Give it a descriptive name (e.g., [website-name]_authenticated_user).
  5. Click Add State.

Add new browser state

Update an existing state

If a session has expired or the site requirements have changed:

  1. Open the extension.
  2. Select an existing state from the dropdown.
  3. Click Update State.

This overwrites the previous session data with your current browser tab's state.

Update existing browser state


Using browser states in test creation

Once a state is saved to your project, you can apply it to any new test case.

  1. Start a new test as usual.
  2. Click the + icon in the instruction bar to access options.
  3. Choose Browser State from the menu.
  4. Select your captured state from the project list.

The test will begin execution directly from the saved session state.

Select browser State in test creation