TOPIC 42/6018 MINNOT STARTED

Tricky widgets: date pickers, tables, drag and drop and rich text

Handle four awkward parts of a page: fill or pick a date, find a row in a table, drag one item onto another, and type into a text box that formats.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: hard-to-grip door handles of different shapes. Most doors have a round knob, and your hand knows what to do. Then you meet a lever, a pull bar, a sliding latch and a key-card reader. The hand is the same. You learn each grip once, and after that the door is easy.

Tom tests Daily List, a to-do list app. Plain boxes and buttons are the round knobs. Tom has them down. Now he meets four awkward ones.

What it is: Playwright is a free tool, made by Microsoft, that drives real web browsers from test code. This topic is about four widgets that need more care than a box or a button. A widget is a ready-made piece of a page, such as a calendar or a table. The four are a (the small calendar for a due date), a table (the task list), (reorder by dragging) and a rich text field (a notes box that can make text bold). Playwright has the pieces for all four. The skill is knowing which piece fits which widget.

Why it matters: these four break simple fill-and-click scripts. A test that clicks the wrong "15", deletes the wrong row, or drops to the wrong place gives a false failure, or worse, a . A steady pattern for each widget keeps Tom from pasting fragile workarounds that fail on the next redesign.

The picture has limits. A door handle is fixed, but a widget is code, and two date pickers on two sites can differ a lot. Tom looks at each one before he picks a grip.

Kept simple: this lesson gives common grips. The search found little official guidance on date pickers and tables, so some advice here is common practice.

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

PLAIN WORDS · 5 in this section
latch
a switch that stays set until reset
playwright
a free Microsoft tool that drives a browser for tests
widgets
small page parts people use, such as a date picker
reorder
put into a different order
workarounds
small tricks used to get round a weakness

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 Learning one reliable way to work each awkward part of a page: a , a table, a drag and a rich text box.

  1. Look
  2. Pick the call
  3. Do it
  4. Check the result
Look first, then grip

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
A new door handleA new kind of widget
Learning the grip onceLearning the working call for that widget
A key-card readerA custom calendar
A sliding latchA drag and drop

WHERE THIS PICTURE STOPS

  • A handle is fixed, but a widget is code and two sites may build it in different ways.
  • A hand learns a grip by feel, and a test learns it by looking at the real page.
  • Doors rarely change their handle, while pages change their widgets with a new release.

HOOK

Look at the handle, then pick the grip.

REMEMBER IT THIS WAY

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

Before a , a table, or a rich text field, look at the real page first, then pick the grip.

What each part of the trick stands for
In the trickWhat it stands for
date pickerthe small calendar for a due date
drag and dropreorders the list
rich texta notes box

A widget changes with a new release, so the working call can go stale.

TELL A FRIEND

Each awkward widget is a door handle of its own shape. Tom learns one working grip for each and checks the result as a user would.

OFTEN MIXED UP WITH Frames, windows, pop-ups and uploads in UI checks. The earlier lesson covers frames, windows and popups, which are other parts of a page that need a special approach. This lesson covers four more awkward parts.

Sources & standards — 4 sources
  1. Market practice

    Actions (Playwright documentation) ↗ — Microsoft (Playwright) · fill works on text boxes and on contenteditable elements; selectOption is for select elements; dragTo presses the mouse on the source and releases it on the target, and a page that relies on the dragover event may need at least two mouse moves in a manual drag (search excerpt, page not opened)

    Describes the built-in actions on a locator: fill for text boxes, pressSequentially for keystroke by keystroke typing, check and uncheck, selectOption, hover, dragTo, press for single keys, and click with modifier keys such as ControlOrMeta (from version 1.45). Says dragTo hovers, presses, moves and releases, and that hover, mouse down, mouse move and mouse up can be used for finer control. The search returned this TypeScript page (https://playwright.dev/docs/input) as well as the Python and Java versions. The reference pages mark the page-level fill and selectOption as discouraged in favour of locator methods. 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

    Locator class reference (Playwright documentation) ↗ — Microsoft (Playwright) · A locator can be narrowed with filter and hasText; text matching with a string is a case-insensitive substring match (search excerpt, page not opened)

    Reference for the Locator class: filter with hasText, hasNotText, has and hasNot (text matching is case-insensitive substring for a string), and, or, locator, nth, first, last, count and all. Says the inner locator of has is matched starting from the outer one. Says hasNot and hasNotText arrived in version 1.33 and and() in version 1.34. 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

    Assertions (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Locator/page web assertions re-read current state; generic value assertions do not retry. APIResponse toBeOK checks a fixed captured 2xx status once, as confirmed by the pinned 1.65 matcher implementation; broad guide grouping must not imply a request resend. Soft assertions retain failure state; poll/toPass repeat their callbacks with explicit side-effect and deadline considerations. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  4. Market practice

    Auto-waiting (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Says Playwright runs actionability checks (visible, stable, enabled, receives events) before an action and fails with a timeout error if they do not pass in time. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

PRACTISE AND KEEP

Sources for this topic — 4 sources
  1. Market practice

    Actions (Playwright documentation) ↗ — Microsoft (Playwright) · fill works on text boxes and on contenteditable elements; selectOption is for select elements; dragTo presses the mouse on the source and releases it on the target, and a page that relies on the dragover event may need at least two mouse moves in a manual drag (search excerpt, page not opened)

    Describes the built-in actions on a locator: fill for text boxes, pressSequentially for keystroke by keystroke typing, check and uncheck, selectOption, hover, dragTo, press for single keys, and click with modifier keys such as ControlOrMeta (from version 1.45). Says dragTo hovers, presses, moves and releases, and that hover, mouse down, mouse move and mouse up can be used for finer control. The search returned this TypeScript page (https://playwright.dev/docs/input) as well as the Python and Java versions. The reference pages mark the page-level fill and selectOption as discouraged in favour of locator methods. 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

    Locator class reference (Playwright documentation) ↗ — Microsoft (Playwright) · A locator can be narrowed with filter and hasText; text matching with a string is a case-insensitive substring match (search excerpt, page not opened)

    Reference for the Locator class: filter with hasText, hasNotText, has and hasNot (text matching is case-insensitive substring for a string), and, or, locator, nth, first, last, count and all. Says the inner locator of has is matched starting from the outer one. Says hasNot and hasNotText arrived in version 1.33 and and() in version 1.34. 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

    Assertions (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Locator/page web assertions re-read current state; generic value assertions do not retry. APIResponse toBeOK checks a fixed captured 2xx status once, as confirmed by the pinned 1.65 matcher implementation; broad guide grouping must not imply a request resend. Soft assertions retain failure state; poll/toPass repeat their callbacks with explicit side-effect and deadline considerations. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  4. Market practice

    Auto-waiting (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Says Playwright runs actionability checks (visible, stable, enabled, receives events) before an action and fails with a timeout error if they do not pass in time. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

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.