microsoft / microsoft/playwright

[Bug]: Test browser native inputs such as date input in different languages

Open
#33,158 3 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P3-collecting-feedback
Dominant language
TypeScript
Stars
96.4k
Forks
6.5k
Avg merge
1d 6h
Merged PRs (30d)
180

Description

Version

1.48.0

Steps to reproduce

Reproduction

  1. Clone repo at https://github.com/mello-r/playwright-accept-language-bug
  2. pnpm install
  3. pnpm test:ui
  4. Input date has the English format and not the German as configured in playwright.config.ts
Expected behavior

I expect it will be possible to emulate a different language on the Playwright browser, to have a different format for browser native inputs such as date input.

Here how it looks in locale Firefox:

Image

Actual behavior

I could not find a way to get the Playwright browser to emulate a different language to display the native input date in a different format.

Here how it looks in Playwright:

Image

Additional context

At first, I wrote a comment on this issue in #18609, but mxschmitt told me that this was a different problem and should be a separate issue.

Environment

System:
OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
CPU: (16) x64 AMD Ryzen 7 5700U with Radeon Graphics
Memory: 15.61 GB / 18.95 GB
Container: Yes
Binaries:
Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v20.11.1/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
pnpm: 9.12.2 - /usr/bin/pnpm
IDEs:
VSCode: 1.94.1 - /mnt/c/Program Files/Microsoft VS Code/bin/code
Languages:
Bash: 5.0.17 - /usr/bin/bash
npmPackages:
@playwright/test: ^1.48.0 => 1.48.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction repository, install its dependencies with pnpm install, and run pnpm test:ui. Inspect playwright.config.ts and compare the configured language with the native date input shown in the reproduction; done means Playwright can display the input using the configured language format.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
internationalization, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.