Shim in Playwright - #47
Conversation
|
As mentioned in the associated issue, the main blocker for now is the absence of |
|
Thank you for the proof-of-concept! I think though, that my statement in #44 (comment) still stands: I'm hesitant to add the complexity of supporting both Puppeteer and Playwright, especially since I'm relying on Chromium-specific APIs, so the value-add of Playwright (as I understand it), which is supporting non-Chromium browsers, does not really apply here. |
I agree with your statement. I think if it becomes possible in the future, a good way forward could be to split graph TD
A[Core] --> B[Puppeteer]
A --> C[Playwright]
The question of the browser is not really important - this is a requirement (by the way you can use Firefox with Puppeteer but I guess that won't work with fuite neither). But the ability to write scenarios using test helpers from the integration tests is of primary value for us to test JupyterLab. |
|
@fcollonval That's definitely a possibility. Just out of curiosity – from Jupyter's perspective, what is the main benefit of Playwright over Puppeteer, if Chromium is the only supported browser engine under the hood? Removing an additional dependency? |
|
The scope of Playwright is broader than Puppeteer as it is an integration tests framework (its competitor is more Cypress than Puppeteer). The nice consequence is a much easier wait of writing scenarios (they have a codegen tool to record actions), more powerful selectors and better tooling to debug scenarios (producing videos, recording a trace to be analyze with a dedicated tool,...). As we were looking to add integration tests we went for Playwright in Jupyter. And to ease testing, we have created a bunch of helpers (to set the app in a certain state). So the main benefit using Playwright for memory leak analysis would be to ease scenarios writing and maintenance - the plan is to have a recurrent job checking memory leak is not worsen by future changes. Avoiding the additional dependency is a good side-effect but not the primary reason. |
|
Ah interesting, thanks for the explanation. Assuming that Playwright supports I'm definitely nervous about the added complexity, though. I wonder if eventually it will make sense to refactor |
Fixes #44