-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Open
Description
This specific test actually tests more than the shift key which means including the Alt and Control modifiers. So maybe the name of the test is not that accurate.
Nevertheless when running the test code for Alt I can see that input events are emitted by Firefox which seems to be right at least when checking manually on: https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html. Using the same page with Chrome I can see input events as well.
So why do we assume that when Alt is pressed, no input event is emitted? Could this be a bug in the CDP protocol?
puppeteer/test/src/keyboard.spec.ts
Lines 259 to 273 in e41a265
| if (modifierKey === 'Shift') { | |
| expect( | |
| await page.evaluate(() => { | |
| return (globalThis as any).getResult(); | |
| }) | |
| ).toBe( | |
| `Keydown: ! Digit1 [${modifierKey}]\n` + `input: ! insertText false` | |
| ); | |
| } else { | |
| expect( | |
| await page.evaluate(() => { | |
| return (globalThis as any).getResult(); | |
| }) | |
| ).toBe(`Keydown: ! Digit1 [${modifierKey}]`); | |
| } |
CC @OrKoN.