fix: Re-use pre-existing browser context in `PlaywrightBrowserController` by Pijukatel · Pull Request #1778 · apify/crawlee-python
Description
PlaywrightBrowserControllercan receive a browser with already active contexts. If that is the case, use the first active context directly in thePlaywrightBrowserControllerinstead of creating a new context
Issues
Testing
- Added unit test
- Manual test on snippet reported by the user
Checklist
- CI passed
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
marked this pull request as ready for review
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
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pijukatel
deleted the
re-use-existing-browser-context
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters