Skip to main content

Quiz: Selenium AI Agent

How to use this quiz

Fifteen questions across the whole course, with a focus on the guardrails. Answer each one before you open the explanation; the lesson to reread is named in each answer.

Quiz

1. A colleague says: “The AI writes our tests, so the build being green means the feature works.” What is missing from that reasoning?

  • A. Nothing, if the AI is good
  • B. Whether a person approved what the tests check, and whether the tests can fail at all
  • C. The number of tests
  • D. The speed of the build
Show answer
B. An approved plan (lesson 8) and tests that fail for the right reason (lesson 17). Lesson 4.
Quiz

2. What is the difference between an instruction in CLAUDE.md and a guardrail in the agent’s tools?

  • A. None
  • B. The AI can ignore an instruction; a guardrail is a check in the tool that refuses the action
  • C. Guardrails only work in CI
  • D. Instructions are checked by the gate
Show answer
B. Lessons 4 and 13.
Quiz

3. The shop page lists “test the Remove button”, but the application has no Remove button. Where should that end up in the plan?

  • A. As a test that expects the button
  • B. Under Gaps and Questions
  • C. Nowhere
  • D. In the seed
Show answer
B. Lesson 6.
Quiz

4. What does a seed test give every generated test?

  • A. Test data
  • B. The way a test starts: driver, base URL, login and helpers
  • C. The plan’s approval
  • D. A screenshot on failure, always
Show answer
B. Lesson 7.
Quiz

5. Under guided, the user wants to skip the plan review with skipPlanReview: true. What happens?

  • A. The plan is skipped
  • B. Nothing changes: guided and strict always require an approved plan
  • C. The plan is approved automatically
  • D. The profile switches to explore
Show answer
B. Lessons 8 and 16.
Quiz

6. generator_write_test gets a test with driver.implicitly_wait(5) and a WebDriverWait in the same file. What happens?

  • A. Written with a warning
  • B. Refused: implicit and explicit waits are mixed, which is an error
  • C. The implicit wait is removed automatically
  • D. Written under explore only
Show answer
B. On its own, an implicit wait is a warning. Lesson 13.
Quiz

7. Under strict, a generated test uses an XPath that is not in the plan’s Elements, locators.json or the taught selectors. What are the two good ways forward?

  • A. Turn off the check, or use explore
  • B. Ask for a test id on the element (and add it to the plan), or approve the locator in locators.json / with teach_selector
  • C. Use an absolute XPath instead
  • D. Use a JavaScript click
Show answer
B. Lesson 12.
Quiz

8. Where does the agent save the test for plan scenario 2.1?

  • A. In tests/test_2_1.py
  • B. In the file named on the scenario’s File: line, so the report can link the result to the scenario
  • C. In specs/
  • D. Where the AI chooses
Show answer
B. Lessons 10 and 14.
Quiz

9. A WebdriverIO test generated for the shop contains await browser.pause(2000). What does the agent do?

  • A. Accepts it: pauses are allowed in WebdriverIO
  • B. Refuses it under WebdriverIO’s own rules (wdio-no-pause) and asks for a wait for the condition
  • C. Converts it to Python
  • D. Raises the timeout instead
Show answer
B. Lessons 11 and 13.
Quiz

10. A failing test expects “Tax (21%): $60.90”; the shop now shows “$60.89”. Under guided, the healer proposes changing the expected value. What should happen?

  • A. The fix is written; it’s a small change
  • B. The fix is refused until you approve it; first decide whether the shop has a bug or the business changed the rule
  • C. The timeout is raised
  • D. The test is deleted
Show answer
B. If it’s a bug, report it and leave the test red. If the rule changed, change the plan and regenerate. Lesson 15.
Quiz

11. Under strict, a heal changes only a locator, from #placeOrderBtn to [data-testid="place-order"]. What happens?

  • A. Refused: strict allows no heals
  • B. Allowed: locators-only lets a heal change locators and waits
  • C. Allowed only with the user’s approval
  • D. Refused because the plan changed
Show answer
B. Lessons 15 and 16.
Quiz

12. verify_test_stability reports “1 of 3 changed expected values stayed green”. What does that mean, and what do you do?

  • A. The test is flaky; add a sleep
  • B. One check passes whatever the value is; compare the exact text or value the user sees
  • C. The application is broken
  • D. Nothing; 2 of 3 is enough
Show answer
B. Lesson 17.
Quiz

13. Under guided, a developer edits a verified test by hand and pushes. What does npx selenium-ai-agent gate report?

  • A. Nothing
  • B. A warning that the file changed outside the agent, and a failure because it is no longer verified
  • C. Only a warning
  • D. It reverts the edit
Show answer
B. Under strict, both are failures. Lesson 18.
Quiz

14. A migrated Selenium 3 test that passed before the migration now fails. What must the migrator not do?

  • A. Debug the migration
  • B. Change the assertion so the test passes
  • C. Run the test several times
  • D. Report the result before and after
Show answer
B. Fix the migration, not the check; report real application bugs. Lesson 19.
Quiz

15. You want the agent to explore a page behind your company’s login. Which approach is right?

  • A. Paste your own password into the chat
  • B. Put the password in the plan’s overview
  • C. Use a test account on a test environment, through setup steps or a seed that reads the credentials from the environment
  • D. Turn on stealth mode
Show answer
C. Lessons 7 and 21.