You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6fdb1c2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(web): fail setInputFiles on a missing path as INVALID_ARGUMENT before clicking (#2039)
* fix(web): fail setInputFiles on a missing path as INVALID_ARGUMENT before clicking
* fix(web): stat upload paths through a shared helper that survives EACCES
* docs(web): say setInputFiles checks reachability, not read permission, and clean up the unit temp dir
* fix(web): keep Node's ENOENT text in the setInputFiles path error
---------
Co-authored-by: Kunal Roy Choudhury <[email protected]>
`locator.setInputFiles` with a path that does not exist or sits under a directory the runner cannot search now fails as `INVALID_ARGUMENT`, a test error with exit code 1, before the engine clicks anything. Before, Playwright's `ENOENT` came back as infrastructure `ENGINE_FAILURE` with exit code 3, and a button that opens a file chooser was clicked first.
if(statsinstanceofError)thrownewTestError('INVALID_ARGUMENT',`setInputFiles path does not exist or is under a directory the runner cannot search: ${stats.message}`);
expect(error).toMatchObject({code: 'INVALID_ARGUMENT',category: 'test',message: `setInputFiles path does not exist or is under a directory the runner cannot search: ${statFailure(missing)}`});
expect(error).toMatchObject({code: 'INVALID_ARGUMENT',category: 'test',message: `setInputFiles path does not exist or is under a directory the runner cannot search: EACCES: permission denied, stat '${hidden}'`});
Copy file name to clipboardExpand all lines: plugins/e2e/skills/e2e/references/writing-tests.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -318,7 +318,7 @@ Each action resolves one node, waits up to `config.actionTimeout` (30 s, or
318
318
`press(key)`, `check()`, `uncheck()`,
319
319
`selectOption(label | { label } | { value } | { index })` (one option; an
320
320
array is `INVALID_ARGUMENT`), `focus()`, `blur()`, `hover()`, `setInputFiles(paths)`
321
-
(relative to the project root; `[]` clears), `dragTo(locator)`, `scrollIntoView()`,
321
+
(relative to the project root; `[]` clears; a missing path, or one under a directory the runner cannot search, is `INVALID_ARGUMENT`), `dragTo(locator)`, `scrollIntoView()`,
322
322
`swipe({ direction, momentum? })`. Web only, `UNSUPPORTED_CAPABILITY` on a
Copy file name to clipboardExpand all lines: skills/e2e/references/writing-tests.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -318,7 +318,7 @@ Each action resolves one node, waits up to `config.actionTimeout` (30 s, or
318
318
`press(key)`, `check()`, `uncheck()`,
319
319
`selectOption(label | { label } | { value } | { index })` (one option; an
320
320
array is `INVALID_ARGUMENT`), `focus()`, `blur()`, `hover()`, `setInputFiles(paths)`
321
-
(relative to the project root; `[]` clears), `dragTo(locator)`, `scrollIntoView()`,
321
+
(relative to the project root; `[]` clears; a missing path, or one under a directory the runner cannot search, is `INVALID_ARGUMENT`), `dragTo(locator)`, `scrollIntoView()`,
322
322
`swipe({ direction, momentum? })`. Web only, `UNSUPPORTED_CAPABILITY` on a
0 commit comments