Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Executing Puppeteer using Java

Recently came across this tool Puppeteer, checked documentation and few videos related to the options it is providing. It matches my use case of executing UI tests in headless browser without the installing the browser.

With puppeteer we need not to install chrome browser to run tests is my understanding please correct me if I'm wrong.

I need to run UI tests using the Java programming language but puppeteer is a node library.

Can anyone tell me how to do this or if this is even possible?

like image 257
Siva Avatar asked Jul 21 '26 13:07

Siva


1 Answers

No this is not possible to easily use Puppeteer from Java But fortunately, Puppeteers' successor named Playwright ( https://playwright.dev/ ) has a version for Java ( https://github.com/microsoft/playwright-java ) now! At the moment, Playwright for Java a pretty stable beta, being developed and you can always ask for support in Slack Comparing these two tools, Playwright is pretty similar to Puppeteer in terms of syntax but supports 3 main browsers (Chromiun, Firefox and WebKit) out of the box

like image 140
Sewa Makhinya Avatar answered Jul 23 '26 03:07

Sewa Makhinya



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!