-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][Electron] filechooser event not emitted when dialog.show(Open|Save)Dialog is called #5013
Comments
I'll close this as a part of the bug triaging process. We have hundreds of bugs and feature requests with dozens and even hundreds of upvotes, while this one only has a few thumbs up. Please feel free to open a new bug and link this one if you'd like to see it addressed. |
Any progress or update on this? I am struggling with the same issue. |
Based on spectron-fake-dialog, I wrote a little library to fake electron dialog for playwright/electron, |
As far as I understand dialogs are not normal browser filechooser, as they are triggered from the backend/main process. So the new dialog is probably more a "window" object, though I could not grab it either this way. @wsw0108 package works perfect for mocking dialogs. I still need to figure keypress to trigger my dialog though but that's a different issue. |
@wsw0108 I tried your test repo, but the |
can we pay you all to fix this we need it @pavelfeldman |
Context:
Description
The
filechooser
event is not emitted whendialog.show(Open|Save)Dialog
is called in Electron’s main process. It doesn’t matter if the dialog function is called viaapp.evaluate
during a test or triggered from the webapp. Electron also allows selecting directories by these dialogs, FileChooser should support this too.Code Snippet
The following test suite that times out shows the issue. Adapted from How to demo on the npm package page, only spec.js is different. Put all three files in one dir and run
npx mocha spec.js
:main.js:
index.html:
spec.js:
The text was updated successfully, but these errors were encountered: