Skip to content

Integrated Playwright, along with existing puppeteer#30

Open
ayush-badola wants to merge 1 commit intocytoscape:masterfrom
ayush-badola:playwright-integration
Open

Integrated Playwright, along with existing puppeteer#30
ayush-badola wants to merge 1 commit intocytoscape:masterfrom
ayush-badola:playwright-integration

Conversation

@ayush-badola
Copy link
Copy Markdown

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.

@Rishi2600
Copy link
Copy Markdown

Hey man, this PR did not get merged?
This was an Issue right?

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.

2 participants