diff --git a/integration-tests/src/main/java/io/quarkiverse/playwright/it/PlaywrightResource.java b/integration-tests/src/main/java/io/quarkiverse/playwright/it/PlaywrightResource.java index 1a780ee..2b2fefd 100644 --- a/integration-tests/src/main/java/io/quarkiverse/playwright/it/PlaywrightResource.java +++ b/integration-tests/src/main/java/io/quarkiverse/playwright/it/PlaywrightResource.java @@ -16,6 +16,10 @@ */ package io.quarkiverse.playwright.it; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import jakarta.enterprise.context.ApplicationScoped; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; @@ -34,8 +38,12 @@ public class PlaywrightResource { public String hello() { String pageTitle = "Hello playwright"; final BrowserType.LaunchOptions launchOptions = new BrowserType.LaunchOptions() - .setHeadless(true); - try (Playwright playwright = Playwright.create()) { + .setHeadless(true) + .setChromiumSandbox(false) + .setChannel("") + .setArgs(List.of("--disable-gpu")); + final Map env = new HashMap<>(System.getenv()); + try (Playwright playwright = Playwright.create(new Playwright.CreateOptions().setEnv(env))) { try (Browser browser = playwright.chromium().launch(launchOptions)) { Page page = browser.newPage(); page.navigate("https://playwright.dev"); @@ -44,4 +52,4 @@ public String hello() { } return pageTitle; } -} +} \ No newline at end of file