Search code examples
e2e-testingwebdriver-iospectron

How do you access menu items in webdriverio (Spectron)?


I am building a set of e2e tests with Spectron and webdriverio for an Electron App. I would like to access the browser's menu bar. Even just being able to have Spectron click on 'File' and then 'New File' would be great.

Thanks for any help!


Solution

  • Okay, it looks like this is currently unsupported:

    ... the require('electron').remote.Menu.getApplicationMenu() API does not serialize to JSON so it can't currently be fetched via Spectron.