fix(filechooser): quick fix for the headful file chooser (#5369)
Fixes #5363
This commit is contained in:
parent
1a1ef83e8d
commit
9923e56b3e
@ -135,7 +135,6 @@ class Page extends EventEmitter {
|
||||
this._client.send('Target.setAutoAttach', {autoAttach: true, waitForDebuggerOnStart: false, flatten: true}),
|
||||
this._client.send('Performance.enable', {}),
|
||||
this._client.send('Log.enable', {}),
|
||||
this._client.send('Page.setInterceptFileChooserDialog', {enabled: true}),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -160,6 +159,9 @@ class Page extends EventEmitter {
|
||||
* @return !Promise<!FileChooser>}
|
||||
*/
|
||||
async waitForFileChooser(options = {}) {
|
||||
if (!this._fileChooserInterceptors.size)
|
||||
await this._client.send('Page.setInterceptFileChooserDialog', {enabled: true});
|
||||
|
||||
const {
|
||||
timeout = this._timeoutSettings.timeout(),
|
||||
} = options;
|
||||
|
Loading…
Reference in New Issue
Block a user