fix: setInputFiles test in driver mode (#28166)

https://github.com/microsoft/playwright/pull/28156
This commit is contained in:
Max Schmitt 2023-11-15 20:09:36 +01:00 committed by GitHub
parent 30aa8cd904
commit 611badcf74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,8 +178,6 @@ export class BrowserContextDispatcher extends Dispatcher<BrowserContext, channel
}
async createTempFile(params: channels.BrowserContextCreateTempFileParams): Promise<channels.BrowserContextCreateTempFileResult> {
if (!this._context._browser._isCollocatedWithServer)
throw new Error('Cannot create temp file: the browser is not co-located with the server');
const dir = this._context._browser.options.artifactsDir;
const tmpDir = path.join(dir, 'upload-' + createGuid());
await fs.promises.mkdir(tmpDir);