Skip to content
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

feat: Add playwright-extra #664

Merged
merged 3 commits into from
Jul 3, 2022
Merged

feat: Add playwright-extra #664

merged 3 commits into from
Jul 3, 2022

Conversation

berstend
Copy link
Owner

@berstend berstend commented Jul 3, 2022

edit, this is now live: https://github.com/berstend/puppeteer-extra/tree/master/packages/playwright-extra


This PR:

  • adds a new playwright-extra package
  • it features a puppeteer compatibility layer so existing plugins derived from PuppeteerExtraPlugin (and expecting certain puppeteer methods) can be used with it
  • currently tested and optimized for the stealth (chromium) and recaptcha (chromium, firefox, webkit) plugin

This approach is much more sane as opposed to switching everything to a new shared plugin base class at once, as attempted in #303
Further background on the reasoning behind this strategy change can be found here: #454 (comment)

The code (informed by maintaining a plugin framework for 4 years now 😄) is in parts much more elegant than puppeteer-extra and once some overdue housekeeping in the repo has been done I plan to refactor puppeteer-extra as well

The next steps are

  • fixing any bugs that might come up related to the core framework functionality (augmenting playwright, plugin handling/events)
  • improving the compatibility layer and supporting more puppeteer-extra plugins
  • make very slight changes to the existing plugins to help improve playwright usage (e.g. the Page type mods in the recaptcha plugin)
  • more documentation (new features, playwright caveats, how to contribute playwright plugins)

Eventually

  • deciding on the best way to properly support both playwright & puppeteer (most likely with a new shared base plugin class)
  • code reuse between playwright-extra & puppeteer-extra

@berstend
Copy link
Owner Author

berstend commented Jul 3, 2022

image

Let's gooo

@berstend berstend merged commit 1f2e12d into master Jul 3, 2022
@berstend berstend deleted the playwright-compat branch July 3, 2022 14:49
@berstend
Copy link
Owner Author

berstend commented Jul 3, 2022

Successfully published:
 - [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant