TOPIC 23/6018 MINNOT STARTED

Devices, locale, geolocation and permissions

Run the same Daily List test as a phone, in German, in another time zone and at a made-up place, with the Playwright options that set each one.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: trying on the same coat in different sizes and weather. A coat shop does not guess. A customer tries the coat small and large. Then the shop checks it in rain, in wind and in the sun. One coat, many conditions. You learn where it pinches.

Daily List is a to-do list app. Lily may use it on a phone, in Germany, in a different , or with the location switch off. Tom, the tester, cannot buy a phone for every case. He asks the test browser to dress itself in each condition.

The picture has limits. A coat on a hanger is not a coat on a person. A browser dressed as a phone is still a computer pretending. It cannot show how a real phone feels in a hand.

What it is: Playwright is a free library from Microsoft that drives a real browser from code. The browsers are Chromium, Firefox and WebKit. This topic is one slice of that library: the settings that make a test browser pretend to be somewhere else. Tom spreads a ready-made bundle for a phone, ...devices['iPhone 13']. That bundle is a . It holds a screen size, touch support and the browser's self-description. For language and time he sets locale: 'de-DE' and timezoneId: 'Europe/Berlin'. For a made-up place he sets and a permission grant, permissions: ['geolocation']. The nearest neighbour is a real phone on a desk. Playwright does not replace that phone.

Why it matters: Many bugs live in the differences. A button that is fine on a laptop may be hidden on a phone. A date such as 01/12 means January in one country and December in another. Without these settings, Tom would meet those bugs only after Lily, in Germany, reported them. With them, he reproduces each case on one laptop before the release.

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

PLAIN WORDS · 5 in this section
playwright
a free Microsoft tool that drives a browser for tests
chromium
the open-source browser engine behind Google Chrome
webkit
The browser engine behind Safari. Playwright can drive it.
descriptor
the shop name printed on a card statement
geolocation
where a device is on Earth, as two numbers

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 Running the same test as a phone, in another language and zone, at a made-up place, with the permission on or off.

  1. Pick the device
  2. Set language and zone
  3. Set place and permission
  4. Compare the results
One coat, many conditions

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The same coatThe same test
Different sizesDevice descriptors
Rain, wind and sunLocale, time zone and colour scheme
A pocket you may or may not openA permission grant

WHERE THIS PICTURE STOPS

  • A coat on a hanger is not a coat on a person. A pretend phone is not a real phone.
  • A shop has a few sizes. The list of devices is long and changes.
  • Weather happens to the coat. A test sets each condition on purpose.

HOOK

One coat, many conditions.

REMEMBER IT THIS WAY

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

If users differ by phone, place or switch, usually set that condition in the test. Do not wait for a real phone.

What each part of the trick stands for
In the trickWhat it stands for
phonedevice descriptors with a screen size
placelocale and time zone
switcha permission grant

A pretend phone is not a real phone, so some bugs only show on real devices.

TELL A FRIEND

Trying one coat in different sizes and weather.

OFTEN MIXED UP WITH Emulators, real devices and device clouds. The general lesson compares emulators, real devices and clouds. This lesson shows the Playwright options.

Sources & standards — 5 sources
  1. Market practice

    Emulation (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.

    Describes device presets that bundle viewport, user agent and touch settings, and the locale, timezoneId, geolocation, permissions and colorScheme options; says locale and timezone affect the browser and not the test runner, and that coordinates can change with context.setGeolocation. Vendor documentation for one tool. Practitioner or vendor guidance, not a standard. · 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.

  2. Market practice

    Configuration (use) (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 which options belong in use and how baseURL makes relative paths work. Vendor documentation, not a standard. · 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.

  3. Market practice

    Projects (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.

    Shows projects in the config file, each with a name and a use block, and spreading a device preset such as devices iPhone 13 into a project; overrides such as viewport go after the spread. Vendor documentation for one tool. Practitioner or vendor guidance, not a standard. · 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

    Isolation (Playwright documentation) ↗ — Microsoft (Playwright) · Each test gets its own browser context, a clean-slate environment that is fast to create and fully isolated (search excerpt, page not opened)

    Says Playwright gives each test its own browser context, a clean-slate environment like an incognito profile that is fast to create and fully isolated. Vendor documentation. 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.

  5. Market practice

    BrowserContext (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: clearPermissions, grantPermissions and storageState options. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes offline emulation and what it covers. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: clearPermissions, grantPermissions and storageState options. 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 — 5 sources
  1. Market practice

    Emulation (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.

    Describes device presets that bundle viewport, user agent and touch settings, and the locale, timezoneId, geolocation, permissions and colorScheme options; says locale and timezone affect the browser and not the test runner, and that coordinates can change with context.setGeolocation. Vendor documentation for one tool. Practitioner or vendor guidance, not a standard. · 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.

  2. Market practice

    Configuration (use) (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 which options belong in use and how baseURL makes relative paths work. Vendor documentation, not a standard. · 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.

  3. Market practice

    Projects (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.

    Shows projects in the config file, each with a name and a use block, and spreading a device preset such as devices iPhone 13 into a project; overrides such as viewport go after the spread. Vendor documentation for one tool. Practitioner or vendor guidance, not a standard. · 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

    Isolation (Playwright documentation) ↗ — Microsoft (Playwright) · Each test gets its own browser context, a clean-slate environment that is fast to create and fully isolated (search excerpt, page not opened)

    Says Playwright gives each test its own browser context, a clean-slate environment like an incognito profile that is fast to create and fully isolated. Vendor documentation. 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.

  5. Market practice

    BrowserContext (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: clearPermissions, grantPermissions and storageState options. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes offline emulation and what it covers. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: clearPermissions, grantPermissions and storageState options. 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.