mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(ff): stop gap for setInputFiles race (#29696)
This commit is contained in:
parent
321e9d72c3
commit
8264bec01e
@ -544,15 +544,13 @@ export class FFPage implements PageDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async setInputFilePaths(progress: Progress, handle: dom.ElementHandle<HTMLInputElement>, files: string[]): Promise<void> {
|
async setInputFilePaths(progress: Progress, handle: dom.ElementHandle<HTMLInputElement>, files: string[]): Promise<void> {
|
||||||
await Promise.all([
|
await this._session.send('Page.setFileInputFiles', {
|
||||||
this._session.send('Page.setFileInputFiles', {
|
frameId: handle._context.frame._id,
|
||||||
frameId: handle._context.frame._id,
|
objectId: handle._objectId,
|
||||||
objectId: handle._objectId,
|
files
|
||||||
files
|
});
|
||||||
}),
|
await handle.dispatchEvent(progress.metadata, 'input');
|
||||||
handle.dispatchEvent(progress.metadata, 'input'),
|
await handle.dispatchEvent(progress.metadata, 'change');
|
||||||
handle.dispatchEvent(progress.metadata, 'change')
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async adoptElementHandle<T extends Node>(handle: dom.ElementHandle<T>, to: dom.FrameExecutionContext): Promise<dom.ElementHandle<T>> {
|
async adoptElementHandle<T extends Node>(handle: dom.ElementHandle<T>, to: dom.FrameExecutionContext): Promise<dom.ElementHandle<T>> {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user