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
- Open AI assistant in the project or open the matching card from the autotest listing.
- Open Autotest cases from a page.
- Select the object-repository page.
- Select the page elements that the scenario may use.
- Copy the generated prompt.
- Send the prompt to your own model.
- Ask the model to return only JSON steps with supported Playwright action names.
- Copy the JSON response without markdown fences.
- Paste the response into the import dialog.
- Check the JSON and correct any reported errors.
- 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
- Open the created autotest.
- Check the order and intent of every step.
- Confirm that each locator action uses the intended object-repository element.
- Replace ambiguous locators with unique locators.
- Check each Value and its source.
- Bind a test account to a
CASEwhen steps use theTEST_ACCOUNTvalue source. - Run Check syntax.
- Fix all errors and review warnings.
- Set the autotest status to
READYonly 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.
Did this page help?