TOPIC 20/4016 MINNOT STARTED

Reading a driver's commands: navigate, ask, act

Every line of a browser script is one of three kinds: go somewhere, ask a question or do something. Learn the three kinds and what their error names mean.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: a remote-control car with three kinds of button. One button drives the car somewhere. One shows the dashboard, such as speed and fuel. One flips a switch, such as the lights. Every trick is a mix of those three.

Daily List is a to-do list app. Tom, the tester, writes a small script that drives a real browser. Mei, the test lead, asks him to explain every line to a new joiner.

Tom sees that each line is one of three kinds. Some lines go to a page. Some ask the page a question, such as its title. Some do something to the page, such as typing in a box.

These are the three kinds of WebDriver command: navigate, ask and act. WebDriver is the agreed way for a script to give orders to a browser.

When a line fails, the error has a name. The name tells Tom what went wrong. A means the page was redrawn, so the box Tom found is gone.

The picture has a limit. A toy car obeys at once. A browser needs time to draw a page, so a command can run too early.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PLAIN WORDS · 2 in this section
dashboard
a screen showing live figures at a glance
redrawn
drawn again

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Sorting every line of a browser script into go, ask or act, and reading the error name when a line fails.

  1. Go to the page
  2. Ask about it
  3. Act on it
  4. Read the error name
Go, ask, act

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
Driving the car somewhereA navigation command
Reading the dashboardAn element state check or a page read
Flipping a switchAn act command, such as a click or typing
A lost remote signalAn error name that says what went wrong

WHERE THIS PICTURE STOPS

  • A toy car obeys at once. A browser needs time to draw a page.
  • A dashboard is always right. A page read can be out of date after a redraw.
  • A car has no names for faults. A driver gives a named error.

HOOK

Go, ask, act: three buttons, many tricks.

REMEMBER IT THIS WAY

A rule of thumb: if you see this, think that.

If a line fails, usually read the error name first. A means the page was redrawn and the box is gone.

What each part of the trick stands for
In the trickWhat it stands for
Error namethe error has a name that tells Tom what went wrong
Stale element referencethe page was redrawn, so the box Tom found is gone

A command can also fail because it ran too early, before the browser drew the page.

TELL A FRIEND

A remote-control car with three buttons: drive somewhere, read the dashboard, flip a switch.

OFTEN MIXED UP WITH Waits and timing in automated checks. The waits lesson is about when to run a command. This lesson is about what kind of command it is.

PRACTISE AND KEEP

Sources for this topic — 6 sources
  1. Market practice

    Browser navigation (Selenium documentation) ↗ — Selenium project · Commands to open an address, go back, go forward and refresh; the page title and current address are read from the driver (search excerpt, page not opened)

    Shows the commands to open an address, go back, go forward and refresh, and (on the browser interactions page) to read the page title and the current address. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    Information about web elements (Selenium documentation) ↗ — Selenium project · An element can be asked whether it is displayed, enabled or selected; its text is the visible text; an attribute read returns the current value, and a separate read returns only the value written in the page markup (search excerpt, page not opened)

    Describes asking an element whether it is displayed, enabled or selected, and reading its attribute and its visible text. The text is the visible text, including sub-elements. A read of an attribute returns the current value, even if it changed after the page loaded. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    WebDriver, World Wide Web Consortium Recommendation ↗ — World Wide Web Consortium · Defines the command set; error codes include element not interactable and element click intercepted (search excerpt, page not opened)

    Defines the HyperText Transfer Protocol (HTTP) command set of the WebDriver protocol. New Session is POST /session. Find Element is POST /session/{session id}/element. Element Click is POST on the element click path. Error codes include element not interactable and element click intercepted. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    Understanding common errors (Selenium documentation) ↗ — Selenium project · A stale element reference means the element is no longer attached to the page, usually because the page redrew it; find it again each time (search excerpt, page not opened)

    Per the search excerpt, a stale element reference means the element is no longer attached to the page, usually because the page redrew it; the advice is to find the element again each time it is used. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    WebDriver Close Window command ↗ — MDN Web Docs · Close Window closes one top-level window and ends the session if it is the last; quit ends the session; find-one throws when nothing matches and find-many returns an empty list (search excerpts, pages not opened).

    Says Close Window closes the current top-level window and that closing the last window ends the session. · Checked 2026-10-19

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  6. Market practice

    Selenium interview questions (findElement, findElements, waits, close and quit) ↗ — TestLeaf · Close Window closes one top-level window and ends the session if it is the last; quit ends the session; find-one throws when nothing matches and find-many returns an empty list (search excerpts, pages not opened).

    An interview-prep post contrasting find-one and find-many commands, implicit and explicit waits, and close and quit. · Checked 2026-10-19

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.