Skip to content

Commit 555197d

Browse files
committed
chore(electron): respect actionTimeout
1 parent ccb908a commit 555197d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/playwright-core/src/client/electron.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,14 @@ export class Electron extends ChannelOwner<channels.ElectronChannel> implements
6767
this._playwright.selectors._contextsForSelectors.add(app._context);
6868
app.once(Events.ElectronApplication.Close, () => this._playwright.selectors._contextsForSelectors.delete(app._context));
6969
await app._context._initializeHarFromOptions(options.recordHar);
70+
71+
// keep in sync with Browser#_setupBrowserContext
72+
app._context._logger = this._logger;
7073
app._context.tracing._tracesDir = options.tracesDir;
74+
app._context.setDefaultTimeout(this._playwright._defaultContextTimeout);
75+
app._context.setDefaultNavigationTimeout(this._playwright._defaultContextNavigationTimeout);
76+
app._context._timeoutSettings.setDefaultTimeout(options.timeout ?? this._playwright._defaultContextTimeout);
77+
7178
return app;
7279
}
7380
}

0 commit comments

Comments
 (0)