最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

selenium webdriver - How to setup spring boot app with playwright docker - Stack Overflow

programmeradmin3浏览0评论

I have a spring boot app running in docker which have playwright code for retrieving data from some websites.

In the old form of my app arch I had my spring boot app running with selenium driver and connected to standalone selenium grid, all worked fine.

Currently, I would like to migrate to playwright as it is more powerful and I am able to connect over CDP to listen for network requests and responses. My intention is to to have my spring boot app to connect remotely to a playwright docker.

I went through playwright documentation here /java/community/welcome and besides having a small section on docker (/java/docs/docker) it is not clear if I am even able to setup such an environment and whether it is supported.

I tried to clone the git repository and run a docker container just for the POC but it failed with the error below:

18.75 The JAVA_HOME environment variable is not defined correctly,
[+] Running 0/1ronment variable is needed to run this program.

So, I am probably missing something and I think is is not suppose to be this complex to set up such an environment.

This is the desired setup

$SpringBoot-App$ -----> $Playwright-Docker$ -----> $Website$

If anyone managed to setup such an environment and could give tips and input it will be appreciated.

发布评论

评论列表(0)

  1. 暂无评论