diff --git a/src/common/JSHandle.ts b/src/common/JSHandle.ts index 67a3c5d2e6611..0dcabd7837159 100644 --- a/src/common/JSHandle.ts +++ b/src/common/JSHandle.ts @@ -846,7 +846,7 @@ export class ElementHandle< throw error; } const files = filePaths.map((filePath) => { - if (path.isAbsolute(filePath)) { + if (path.win32.isAbsolute(filePath) || path.posix.isAbsolute(filePath)) { return filePath; } else { return path.resolve(filePath);