-
Notifications
You must be signed in to change notification settings - Fork 535
feat: add persistent browser context handling #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add _persistentContext property to store and reuse browser context - Cache and reuse existing persistent context if available - Improve browser context management efficiency
src/context.ts
Outdated
private async _launchPersistentContext(): Promise<playwright.BrowserContext> { | ||
// If we already have a persistent context, return it. | ||
if (this._persistentContext) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be higher up, in _ensureBrowserContext
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, made the required changes and pushing another commit into the PR
- Consolidate persistent context handling into _ensureBrowserContext - Optimize cleanup by running context/browser closures in parallel - Only set persistent context for local browser instances - Move _persistentContext property with other context properties This change simplifies the browser context management code while maintaining the same functionality, making it more maintainable and efficient.
@microsoft-github-policy-service agree |
Failed to create a ProcessSingleton for your profile directory