I have started using playwright for java and I tried out something very simple locally like:
Playwright playwright = Playwright.create();
Browser browser = playwright.chromium().launch();
Page page = browser.newPage();
page.navigate("https://www.google.com");
logger.info(page.content());
This worked fine on my local environment but I want to be able to use playwright from an aws java lambda. Is this possible? When I deploy a simple java lambda with the above code in it and invoke the lambda from the aws console I get an error about:
"Failed to install browsers"
and
Error: Failed to launch chromium because executable doesn't exist at /home/user............/chrome-linux/chrome Try re-installing playwright with "npm install playwright".
In terms of the lambda, I am building it using a gradle build into a zip which is uploaded to aws. Any advice on whether playwright for java can run from a java aws lambda and how to get it working?