microsoft / microsoft/playwright
[Bug]: Test browser native inputs such as date input in different languages
Nobody has claimed this yet.
- 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
- Clone repo at https://github.com/mello-r/playwright-accept-language-bug
pnpm installpnpm test:ui- 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:
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:
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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