~/talk

May the Requests Be With You: Playwright API Magic

Talkat TestFlix 2024 · 2024-10-19..10-20· [testing, web-platform]
linkedin:butchmayhew
slides:none on file

Uses Playwright to intercept and assert live API calls (api.practice-software-testing.com/products), capturing the products response and running route.fetch and route.continue to make nine UI assertions against name and price. Shows aborting slow or unwanted calls with route.abort, modifying a fetched JSON to set a product name to "mock product", price to 10,000 and inStock false, then returning it with route.fulfill with JSON file. Includes debugger demos and a public repo with runnable examples.

AI-written summary · about

  1. 0:00Introduction
  2. 2:37Intercepting API requests
  3. 8:44Aborting long requests
  4. 10:53Modifying API responses
  5. 13:00Mocking from JSON files
  6. 15:10Final thoughts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.