playwright-rust
playwright-rust copied to clipboard
Is this project still maintained?
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
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.
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 https://github.com/microsoft/playwright/pull/12937.
Thoughts on the feasibility of that?
I would be interested in this too.
Have you considered turning on donations to help you maintain this package?
I've started supporting 1.25 in dev branch, I can't say anything about it because it's under investigation.
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
This is the best piece of news this week!
I'd like to see a donate button somewhere.
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!
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 :-)
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.
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 :)
I haven't seen any commits this year, I do see some PRs (https://github.com/octaltree/playwright-rust/pull/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?
Guess not