Skip to content
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

Is this project still maintained? #30

Open
uthng opened this issue May 12, 2022 · 15 comments
Open

Is this project still maintained? #30

uthng opened this issue May 12, 2022 · 15 comments

Comments

@uthng
Copy link

uthng commented May 12, 2022

Hi,

I would like to use playwright with rust in my project. When searching, I found thks repository. But it seems that there hasnot been updated for a while. So, I would like to know if this project is still maintained? If yes, does it work with the latest version of Playwright?

Best regards

NT

@octaltree
Copy link
Owner

Good question. It works fine as long as the test passes, but I do not recommend it for production.

I have been unable to generate the necessary effort to follow up recently.
Now that rust--headless-chrome is active by new maintainer, there is also the option of chromiumoxide.

@randall-coding
Copy link

randall-coding commented Jul 23, 2022

Good question. It works fine as long as the test passes, but I do not recommend it for production.

I have been unable to generate the necessary effort to follow up recently. Now that rust--headless-chrome is active by new maintainer, there is also the option of chromiumoxide.

@octaltree What would you estimate the level of time commitment needed to upgrade playwright driver from 1.11 to 1.20.2 for these bindings? I am willing to help out with that as I need the new driver features to upload large files and that was fixed in a (somewhat) recent PR microsoft/playwright#12937.

Thoughts on the feasibility of that?

@jtomek
Copy link

jtomek commented Jul 27, 2022

I would be interested in this too.

Have you considered turning on donations to help you maintain this package?

@octaltree
Copy link
Owner

octaltree commented Aug 1, 2022

I've started supporting 1.25 in dev branch, I can't say anything about it because it's under investigation.

@randall-coding
Copy link

I've started supporting 1.25 in dev branch, I can't say anything about it because it's under investigation.

Hey that's awesome @octaltree . Btw I just hired someone to look into this too and help with the upgrade. Perhaps you'd be interested in working with him? This is his handle @tmahmood

@jtomek
Copy link

jtomek commented Aug 2, 2022

This is the best piece of news this week!

I'd like to see a donate button somewhere.

@octaltree
Copy link
Owner

We can now use src/protocol/protocol.yml for interaction with the playwright server. Previously we had to read the original source.
I have written a process in scripts/src/generate_protocol.rs to generate that schema as a type of rust. If you could help me, I would be very grateful.
The api and implementation will be prioritized and the protocol part will come later, so pull requests are welcome!

@tmahmood
Copy link

tmahmood commented Aug 5, 2022

Hi @octaltree, glad that you are working on the project again :)

I have been studying the library for a while and trying to upgrade it to 1.24.2.

The initial problem I am facing is the InitializationError,

With the help of @randall-coding, I've found, the problem is, after starting the driver, we need to send an initialize message to it. The device list is returned as response. On 1.11.0, it was output to the stdin immediately after run-driver start.

Can you provide me an idea, guideline, how can I send this initial message? Or you are working on this already?

Thank you :-)

@octaltree
Copy link
Owner

I am not familiar with the specific errors you are facing with 1.24.2. Sorry.
The latest commit sends an initialize request and creates a Playwright instance from the response. In 1.11, I have a similar implementation that reads the output of the driver and the microsoft client. Now that the schema for sending requests has been clarified, it may be possible to use it.

https://github.com/microsoft/playwright-python/blob/ab6bea1ef1c2358440835b866b98bb5b479139e3/playwright/async_api/_context_manager.py#L46
https://github.com/microsoft/playwright-python/blob/ab6bea1ef1c2358440835b866b98bb5b479139e3/playwright/_impl/_connection.py#L222
https://github.com/microsoft/playwright-python/blob/ab6bea1ef1c2358440835b866b98bb5b479139e3/playwright/_impl/_connection.py#L164

That's all I can say right now.

@tmahmood
Copy link

tmahmood commented Aug 8, 2022

Thank you very much for your response.

I am trying with the latest alpha version you are using now in the dev branch. Are you able to run tests? For me because of the InitializationError, playwright-rust seems to be not working.

I am able to send request to playwright server now. But I am receiving this error:

Request received by playwright

{ guid: '0', method: 'initialize', param: { sdkLanguage: 'rust' } }

Error I am getting

{"error":{"error":{"message":"Target page, context or browser has been closed","stack":"Error: Target page, context or browser has been closed\n    at DispatcherConnection.dispatch (/home/mahmood/.cache/ms-playwright/playwright-rust/1.25.0-alpha-jul-26-2022/package/lib/server/dispatchers/dispatcher.js:298:49)\n    at PipeTransport.transport.onmessage (/home/mahmood/.cache/ms-playwright/playwright-rust/1.25.0-alpha-jul-26-2022/package/lib/cli/driver.js:63:26)\n    at Immediate._onImmediate (/home/mahmood/.cache/ms-playwright/playwright-rust/1.25.0-alpha-jul-26-2022/package/lib/protocol/transport.js:89:34)\n    at processImmediate (node:internal/timers:466:21)","name":"Error"}}}

I'll be digging in more, if you have anything that would shade light on the issue, it will be much appreciated :)

@satvikpendem
Copy link

I haven't seen any commits this year, I do see some PRs (#51), but it doesn't look like the author, @SamuelMarks, actually has write access so they can't actually merge any PRs, is the project still maintained in 2023?

@NinoSkopac
Copy link

Guess not

@coopbri
Copy link

coopbri commented Jan 3, 2025

Hi all, just curious if there is an active fork of this? If not, I would gladly support this under https://github.com/omnidotdev, where my team and I are building an ecosystem of FOSS software (you'll notice the org is pretty barren as far as public repos go at the moment, we are launching our first FOSS product in 2025). If there is consensus on this, let me know and I can work to get it forked and in good hands. We use both Rust and Playwright and I would love to see this awesome project get the love and care it needs!

@satvikpendem
Copy link

@coopbri sounds good, would love to see it

@coopbri
Copy link

coopbri commented Jan 5, 2025

@coopbri sounds good, would love to see it

Sure thing! I just performed the migration (fork) and have been working on an upgrade to the latest Playwright version (v1.49.x), based on the original work from @tmahmood (#49) and @SamuelMarks (#51) (thank you both). You can see this pending work at https://github.com/omnidotdev/playwright-rust/tree/feature/1.49.

I might need help with this upgrade, as I am just now getting a feel for the repository and how it is set up. If anyone has insight or can contribute, that is very welcome. It's getting close, but there are some pending issues with the API (particularly device descriptors issues at runtime). All code and processes will be documented to the best of my ability, and once we are good to go I will upload to crates.io. Rest assured, this repository will be active so long as it is beneficial to the community and Playwright is competitive in the test framework/browser automation markets :) Also, there will be Discord support soon 🤝

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

No branches or pull requests

8 participants