Can't interact with dialog #23

Open
krzkaczor opened this Issue May 6, 2016 · 4 comments

Projects

None yet

4 participants

@krzkaczor

I am opening dialog in my app like this:

const path = dialog.showOpenDialog(remote.getCurrentWindow(), {
      title: i18n.t("Where do you want to save it?"),
      properties: ['openDirectory', 'createDirectory']
    });

And I cannot find way to select directory in tests. I tried using webdriverio's keys with no luck. I thought that maybe electron creates second window and that's why I can't interact with it but by using client.getWindowCount() it founds only 1 window. Any ideas?

@kevinsawicki
Collaborator

Any ideas?

I don't think dialogs can be tested well yet via ChromeDriver and Spectron. Will look into this further.

@remss
remss commented May 31, 2016

Same issue with dialog.showMessageBox

@davej
davej commented Jun 27, 2016

Also encountered this. Got around it with a super-simple mock version of dialog that is used when the application is started with a test ENV. It works ok but it's very messy.

@davej
davej commented Jul 25, 2016

See #94 for a somewhat graceful way of mocking dialogs for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment