-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add file dialog events and methods #535
Conversation
d9162e9
to
4d4f3bf
Compare
We are going to review internally first. |
element: script.SharedReference, | ||
files: [*text] | ||
input.SetFilesParameters = input.FileDialogInfo .and { | ||
files: [*text] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think instead we should provide the element reference in the interception event and allow setting files both with and without the dialog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a use-case for setting files when the user was never prompted for a dialog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the use case would be to fill out the forms without testing/verifying if they really result in a dialog (that is an existing use case supported by Puppeteer).
index.bs
Outdated
|
||
</div> | ||
|
||
#### The input.displayFileDialog Command #### {#command-input-displayFileDialog} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the use case for displaying the dialog to the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It allows introspection of file dialog prompt if a manual workflow. I believe this makes this feature complete, but we can omit this for the initial proposal.
4d4f3bf
to
30d1f37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update the spec with the following:
- mention that the dialog is not blocking and it is automatically dismissed.
- add a shared reference to the element that is the target of the dialog.
- keep the shared reference as the parameter on setFiles
I'm actually not sure we agreed to that (maybe by default if you're subscribed to the events?) But we need some kind of per-session configuration that enables either auto-dissmiss or not depending on the use case. |
I think @OrKoN meant that it is automatically dismissed when a session is subscribed to the event.
So if one session is subscribed to the interception event, other sessions cannot be not auto-dismiss for the same reason multiple users of the same browser cannot use the browser if any of the users is picking a file. |
b7b25a5
to
92cdb9e
Compare
@jrandolf could you maybe explain why this PR got closed? |
I'll be separating this PR into smaller, more independent features. |
#494
Preview | Diff