electron-userland / spectron

DEPRECATED: 🔎 Test Electron apps using ChromeDriver
http://electronjs.org/spectron
MIT License
1.68k stars 229 forks source link

Testing global shortcuts (accelerators) #985

Open coda-nsit opened 3 years ago

coda-nsit commented 3 years ago

My electron app has many webviews and some global keyboard shortcuts like cmd=: zoom in cmd-: zoom out cmdr: reload

Everything works in the app and I want to write integration tests.

Till now I have not found any way to simulate/test this, since, cmd key is not identified and thus, nothing happens when I press these combinations.

I have tried RobotJS (does not support latest node version so rebuilding it for electron fails).