playwright
playwright copied to clipboard
[Feature]: Send keyboard events to electron main process
Feature request
It would be nice to be able to send keyboard events to the application when electron testing, not just to pages and frames.
This should be able to help with testing keyboard shortcuts that are registered by attaching them to menu items.
@dgozman Is it possible to test registered localShortcuts with Playwright in electron? I've tried using await page.keyboard.press('Meta+s') for example, and the keyboard presses seem to be executing, but the shortcut is not performing as expected.
@geenalux I don't think it's possible to trigger local shortcuts.
Well you are able to send keyboard events to different processes. I know that it is possible at least macOS and windows and Linux.
Hi folks sorry to bump — do we know what Playwright is lacking to have this capability? It's a big gap for testing capabilities in Electron apps, especially if something doesn't have a button in the UI.
Has anyone been able to work around this?
Bump. I'm having the same issue. Can't trigger menu items from keypresses in Electron app.
Bump. This feature would be so helpful when writing tests for Electron App.
Did anyone find a workaround for this?
Bump. Any plans on adding this feature? Or at least a workaround?
Is there any update on this ? Without this feature we cant event test some of the attributes.