-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Feature] codegen: Electron Support #5181
Comments
Well, it's very crude, but I have a proof of concept here: I didn't want to open a PR because it's just a proof of concept, and shouldn't be merged. This might be enough for my needs, at least it's enough to evaluate this for use with our electron application. Quite impressed with this codebase! |
Why not, I think it looks promising!
Feel free to file it, I'm sure others will find it useful as well. |
Thanks for the feedback! I've made some changes to the PR, and it seems to work reliably for codegen. I also tossed together another PR that attempts to add electron support to all of playwright-cli, rather than just hacking it into the codegen function. It's pretty messy at the moment, and suffers from a square peg/round hole problem. When I have more time I'll play with the ElectronApplication API a bit more and see if I can make it behave the same way the other browsers do, which have a clear separation between creating the browser instance and opening a page. Right now I'm using the electron launch args to automatically open a page, which more or less breaks the pattern used everywhere in playwright-cli. Unfortunately, the electron context throws an error when openPage is called, but it might be possible to replace that with an explicit browser window open. Also for a time I had successfully connected electron page close with the cli exiting, but I seem to have broken it again. |
I'll close this as a part of the bug triaging process. We have hundreds of bugs and feature requests with dozens and even hundreds of upvotes, while this one only has a few thumbs up. Please feel free to open a new bug and link this one if you'd like to see it addressed. |
How to codegen by using electron? |
Fantastic project! I'd love to see codegen support for Eelectron!
There are no projects that I'm aware of that support test click recording inside of an electron application. This would greatly simplify E2E testing for electron apps.
Thanks for a great project!
The text was updated successfully, but these errors were encountered: