replayio / playwright Goto Github PK
View Code? Open in Web Editor NEWReplay enabled fork of the Playwright library
License: Apache License 2.0
Replay enabled fork of the Playwright library
License: Apache License 2.0
Playwright pays attention to this env var during installation and doesn't download the browsers. We should do the same thing for replay specific browsers.
It looks like installing this package doesn't work in macOS 12.0 Monterey:
$ npm install
> @recordreplay/[email protected] install
> node install.js
Installing replay browsers...
Done.
/Users/dan/devel/playwright/lib/install/installer.js:130
throw new Error(`Failed to download ${browserName}, caused by\n${e.stack}`);
^
Error: Failed to download chromium, caused by
Error: ERROR: Playwright does not support chromium on mac12-arm64
at Object.assert (/Users/dan/devel/playwright/lib/utils/utils.js:86:15)
at Registry.downloadURL (/Users/dan/devel/playwright/lib/utils/registry.js:307:17)
at Object.downloadBrowserWithProgressBar (/Users/dan/devel/playwright/lib/install/browserFetcher.js:84:26)
at async validateCache (/Users/dan/devel/playwright/lib/install/installer.js:129:9)
at async installBrowsersWithProgressBar (/Users/dan/devel/playwright/lib/install/installer.js:80:9)
at /Users/dan/devel/playwright/lib/install/installer.js:130:19
at async validateCache (/Users/dan/devel/playwright/lib/install/installer.js:129:9)
at async installBrowsersWithProgressBar (/Users/dan/devel/playwright/lib/install/installer.js:80:9)
I've successfully integrated Replay with Playwright using this and the recording-cli, but I couldn't find any information on this feature.
I know that Playwright is not a test runner, but it is often used by Jest, or using the official Playwright test runner Playwright Test
It would be great to only keep the recordings / only upload recordings for tests that have failed. This would reduce greatly the quantity of uploads and be easier to sort through them.
Is it currently possible to do something similar to this, even if it requires some glueing?
We updated our playwright fork to 1.18.1 in order to be compatible with @playwright/test
but we're hitting a dependency issue.
We can launch the test harness via npx @recordreplay/playwright
to override the browser loading to point to the Replay browsers. But @playwright/test
requires playwright-core
via a child process so when the test launches the browser, it uses the playwright-core
logic instead of ours and fails to launch the Replay browser.
I tried to hijack (via Module.prototype.require
) the loader logic which worked for part of the flow but fails when the child process loads the actual test file. That process uses the native require
(undoctored by my hack) and then launches the default browsers.
It looks like the current implementation requires using playwright.browser.launch() to execute the tests. This requires defining the test run orchestration either within the test file or with a "helper" file and executing the tests by running that file with Node.
The probably more common use case for Playwright is to have a Playwright config file, the test files in the tests
directory, using the test
syntax to organize test blocks within the file, and then running tests using npx playwright test
.
https://playwright.dev/docs/intro#first-test
We should support this implementation if possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.