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

[Feature] support docker with pure java remote api (without requiring local node for "bounce") #1446

Closed
k1w1m8 opened this issue Dec 26, 2023 · 2 comments

Comments

@k1w1m8
Copy link

k1w1m8 commented Dec 26, 2023

Per microsoft/playwright#26482 we can use playwright-java with driver/node and browser(s) inside a docker container, even for unsupported OS. I have provided a sample test case there which demonstrates this.

However, there is a major practical drawback for the PW java API that the host needs to have an additional driver/node available purely to do the "bounce" to the docker driver/node, either installed automagically via PW or by hand for unsupported O/S.

For the use case of API client and server Docker, this additional host driver node seems clunky, heavyweight and is using only a tiny fraction of the available host driver/node capability.

Would it possible to extend the existing Java API to provide a "pure java" way to connect to remote driver/node, without requiring a host driver/node connection first?

For this use case, it would have many benefits:

  • works on any any OS
  • doesn't require internet access to download host node (in case of unsupported OS at least)
  • consume fewer host resources.
  • quicker PW start time
  • etc

Not sure about other API languages such as Python etc, but possibly they could also benefit from such a change.

Selenium already provides a pure java API to connect to Docker server, RemoteWebDriver.

@k1w1m8 k1w1m8 changed the title [Feature] support docker with pure java api (without requiring local node for "bounce") [Feature] support docker with pure java remote api (without requiring local node for "bounce") Dec 26, 2023
@yury-s
Copy link
Member

yury-s commented Dec 27, 2023

We've considered this idea in the past but decided not to do that as it would increase the maintenance burden. Currently the logic of connecting to the remote playwright is implemented in the driver which is shared by all implementations. The benefit of porting that to each language is basically saving on some resources which is not a problem at this point.

There are two related requests: #467 and #1196.

I'm closing this issue as we are not planning to do the proposed change.

@yury-s yury-s closed this as completed Dec 27, 2023
@k1w1m8
Copy link
Author

k1w1m8 commented Dec 28, 2023

I don't agree with your summary that "the benefit ... to each language is basically saving on some resources".

The saving of resources is useful but not that important from my perspective.

The primary benefits for this change for remote playwright are to reduce the complexity and limitations of installing the client API.

  • automatic support for any host O/S
  • no need for host to install "redundant" node, no additional native code dependencies
  • no need for host internet access for playwright npm download

These are non trivial benefits, that the competing Selenium provides.

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

2 participants