microsoft / microsoft/playwright
[BUG] CapsLock doesn't work
- Dominant language
- TypeScript
- Stars
- 96.3k
- Forks
- 6.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 180
Description
**Context:**
- Playwright Version: 1.24.2
- Operating System: Win10
- Node.js version: v.16.16
- Browser: Chromium
**Code Snippet**
```javascript
import { expect, test } from '@playwright/test'
test('Test CapsLock', async ({ page }) => {
await page.goto('https://playwright.dev/')
await page.locator('.DocSearch-Button-Placeholder').click()
await page.keyboard.press('CapsLock')
await page.keyboard.press('KeyA')
await expect(page.locator('.DocSearch-Input')).toHaveValue('A') // actual value is 'a'
})
```
I was trying to write a test on the password input element which should show the warning message when the CapsLock button is turned on, but run into this issue. It's not a big deal and probably might be a bit painful to fix, but still...
Contributor guide
Research direction
Run the provided Chromium-on-Windows reproduction and confirm that pressing CapsLock followed by KeyA produces “a” instead of “A”. Trace the keyboard handling reached by page.keyboard.press, then verify that the same scenario produces the expected uppercase value without regressing other keyboard behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100