mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03: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> {
|
||||
await Promise.all([
|
||||
this._session.send('Page.setFileInputFiles', {
|
||||
frameId: handle._context.frame._id,
|
||||
objectId: handle._objectId,
|
||||
files
|
||||
}),
|
||||
handle.dispatchEvent(progress.metadata, 'input'),
|
||||
handle.dispatchEvent(progress.metadata, 'change')
|
||||
]);
|
||||
await this._session.send('Page.setFileInputFiles', {
|
||||
frameId: handle._context.frame._id,
|
||||
objectId: handle._objectId,
|
||||
files
|
||||
});
|
||||
await handle.dispatchEvent(progress.metadata, 'input');
|
||||
await handle.dispatchEvent(progress.metadata, 'change');
|
||||
}
|
||||
|
||||
async adoptElementHandle<T extends Node>(handle: dom.ElementHandle<T>, to: dom.FrameExecutionContext): Promise<dom.ElementHandle<T>> {
|
||||
|
Loading…
Reference in New Issue
Block a user