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.
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
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
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
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
5. Under guided, the user wants to skip the plan review with skipPlanReview: true. What happens?
- A. The plan is skipped
- B. Nothing changes:
guidedandstrictalways require an approved plan - C. The plan is approved automatically
- D. The profile switches to
explore
Show answer
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
exploreonly
Show answer
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/ withteach_selector - C. Use an absolute XPath instead
- D. Use a JavaScript click
Show answer
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
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
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
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-onlylets a heal change locators and waits - C. Allowed only with the user’s approval
- D. Refused because the plan changed
Show answer
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
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
strict, both are failures. Lesson 18.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
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