How-to

Autotest generation from a page

Autotest generation from a page

Autotest generation from a page drafts an autotest from a page and its elements in the object repository. ComplexQA prepares a prompt for your own model and imports the returned JSON steps.

Role: a team member with write access to the project.

Prerequisites

  • The project has an object-repository page with the correct path.
  • The page has elements with current, unique locators.
  • You can use a model outside ComplexQA.

ComplexQA does not host or call a model.

Steps

  1. Open AI assistant in the project or open the matching card from the autotest listing.
  2. Open Autotest cases from a page.
  3. Select the object-repository page.
  4. Select the page elements that the scenario may use.
  5. Copy the generated prompt.
  6. Send the prompt to your own model.
  7. Ask the model to return only JSON steps with supported Playwright action names.
  8. Copy the JSON response without markdown fences.
  9. Paste the response into the import dialog.
  10. Check the JSON and correct any reported errors.
  11. Create the autotest.

The imported autotest appears in the project with generated steps.

The import contract allows on a case autotest_case_title, autotest_case_description, autotest_case_status, autotest_steps. On a step: sort_order, action_name, target, value_text, timeout_ms. Card fields (value_source_type, value_source_field, pre_autotest_case_ids, kind COMMON) are rejected. After create, set TEST_ACCOUNT on fill steps, then kind and predecessors on the card. Breakdown: How to author autotest steps without false failures.

Review before a run

  1. Open the created autotest.
  2. Check the order and intent of every step.
  3. Confirm that each locator action uses the intended object-repository element.
  4. Replace ambiguous locators with unique locators.
  5. Check each Value and its source.
  6. Bind a test account to a CASE when steps use the TEST_ACCOUNT value source.
  7. Run Check syntax.
  8. Fix all errors and review warnings.
  9. Set the autotest status to READY only when the scenario is ready to run.

READY makes a CASE eligible for an autotest run. Generated content remains a draft until you review it.

Version 1.2.0 · Last updated 2026-09-14

Did this page help?