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
Copy file name to clipboardExpand all lines: docs/src/electron-api/class-electron.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,34 @@ If you are not able to launch Electron and it will end up in timeouts during lau
51
51
52
52
* Ensure that `nodeCliInspect` ([FuseV1Options.EnableNodeCliInspectArguments](https://www.electronjs.org/docs/latest/tutorial/fuses#nodecliinspect)) fuse is **not** set to `false`.
53
53
54
+
**Mocking native dialogs:**
55
+
56
+
Playwright does not intercept the native Electron [dialog](https://www.electronjs.org/docs/latest/api/dialog) API
57
+
(`dialog.showOpenDialog`, `dialog.showSaveDialog`, `dialog.showMessageBox`, etc.) because those calls happen in the
58
+
Electron main process and go straight to OS APIs. Use [`method: ElectronApplication.evaluate`] to replace the
59
+
relevant methods in the main process so tests run deterministically without any OS-level UI:
60
+
61
+
```js
62
+
// Stub the open dialog to always return a fixed path.
0 commit comments