Page.setInterceptFileChooserDialogIntercept file chooser requests and transfer control to protocol clients. When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event `Page.fileChooserOpened` is emitted.
| Name | Type | Description |
|---|---|---|
enabled | boolean | |
cancel (optional) | boolean | If true, cancels the dialog by emitting relevant events (if any) in addition to not showing it if the interception is enabled (default: false). |
{
"id": 1,
"method": "Page.setInterceptFileChooserDialog",
"params": {
"enabled": true
}
}
{
"id": 1,
"result": {}
}
const result = await send('Page.setInterceptFileChooserDialog', {"enabled": true});
console.log(result);