AI AGENT · NEW

Write web tests

Ask your agent for a web test. It opens the browser, finds stable locators and writes page objects and tests. No Selenium server needed.

Before you start

  • Chrome, Edge or Firefox on your machine; see Install.
  • A BELLATRIX web test project, set up with the web skills:
bellatrix init --agent claude --language csharp --domains web

Use --language java or typescript for the other flavours.

What to say to your agent

  • Write a BELLATRIX web test that adds Falcon 9 to the cart on https://demos.bellatrix.solutions and checks the total.
  • Create a page object for the checkout page.
  • Add a test for an empty cart.
  • Automate TC-2001.

What you will see

  1. The agent opens the browser and goes to the page.
  2. It performs each step: clicks, typing, navigation.
  3. Its locator specialist picks a stable locator for each element.
  4. It writes or extends the page object and the test, then builds the project.
  5. It closes the browser and asks you to run the test.

Where the files end up

In your web test project: one folder per page under Pages/, with the page's elements, actions and assertions, and the tests under Tests/. The exact layout follows the BELLATRIX conventions of your language.

Tips

  • Stable tests need stable attributes. The agent prefers data-testid, then IDs, then accessible names. If an element has none, it tells you and suggests adding a data-testid.
  • Use your own Selenium server or grid by giving the agent its URL in the prompt.
  • TypeScript projects cover web only. For desktop and mobile, use C# or Java.
Under the hood
  • The agent calls bellatrix web start-session, navigate, snapshot, click and similar verbs, then close-session.
  • Without --remote-url, the CLI starts a local browser driver and stops it on close-session.
  • Locators starting with / or (/ are XPath; anything else is CSS.
  • More: How the agent works, web commands.