Integrated Playwright, along with existing puppeteer#30
Open
ayush-badola wants to merge 1 commit intocytoscape:masterfrom
Open
Integrated Playwright, along with existing puppeteer#30ayush-badola wants to merge 1 commit intocytoscape:masterfrom
ayush-badola wants to merge 1 commit intocytoscape:masterfrom
Conversation
|
Hey man, this PR did not get merged? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR, I have created a new branch for integrating playwright and have also added one test case in a new test file using mocha. The test file is named "playwright-test.spec.js".
Now, user can specify the 'engine' he wants to use. The 2 options for 'engine' are puppeteer and playwright.
The main difficulty was to look for parts of the code in index.js that needs to be changed for playwright as many of the functions are similar to puppeteer.
One major problem which I faced was base64 encoding. As playwright does not support base64 encoding and I missed it, I couldn't get the right file format. But once I figured it out, I deleted the base64 encoding for playwright before taking the screenshot. And after taking the screenshot, I converted the Buffer provided (playwright produces buffer instead of base64) to a string which represented base64.
Using this method, the workaround for playwright was made successful.