Skip to content

fix: Re-use pre-existing browser context in PlaywrightBrowserController#1778

Merged
Pijukatel merged 2 commits intomasterfrom
re-use-existing-browser-context
Mar 6, 2026
Merged

fix: Re-use pre-existing browser context in PlaywrightBrowserController#1778
Pijukatel merged 2 commits intomasterfrom
re-use-existing-browser-context

Conversation

@Pijukatel
Copy link
Collaborator

@Pijukatel Pijukatel commented Mar 5, 2026

Description

  • PlaywrightBrowserController can receive a browser with already active contexts. If that is the case, use the first active context directly in the PlaywrightBrowserController instead of creating a new context

Issues

Testing

  • Added unit test
  • Manual test on snippet reported by the user

Checklist

  • CI passed

@github-actions github-actions bot added this to the 135th sprint - Tooling team milestone Mar 5, 2026
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Mar 5, 2026
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.20%. Comparing base (944753a) to head (2ce9364).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1778      +/-   ##
==========================================
- Coverage   92.25%   92.20%   -0.05%     
==========================================
  Files         156      156              
  Lines       10654    10654              
==========================================
- Hits         9829     9824       -5     
- Misses        825      830       +5     
Flag Coverage Δ
unit 92.20% <100.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Pijukatel Pijukatel requested a review from Mantisus March 5, 2026 14:20
@github-actions github-actions bot added the tested Temporary label used only programatically for some analytics. label Mar 5, 2026
@Pijukatel Pijukatel force-pushed the re-use-existing-browser-context branch from 0a20346 to 2ce9364 Compare March 5, 2026 15:10
@Pijukatel Pijukatel marked this pull request as ready for review March 5, 2026 15:10
@Pijukatel Pijukatel requested a review from vdusek March 5, 2026 15:11
Copy link
Collaborator

@Mantisus Mantisus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

This should be taken into consideration when working on #1744

Copy link
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Pijukatel Pijukatel merged commit 4487543 into master Mar 6, 2026
32 checks passed
@Pijukatel Pijukatel deleted the re-use-existing-browser-context branch March 6, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to config user_data_dir when combine crawlee playwright camoufox

3 participants