You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by ja...@apache.org on 2026/07/22 17:41:21 UTC
(grails-core) 04/04: document PlaywrightGebSpec usage in grails-geb README
This is an automated email from the ASF dual-hosted git repository.
jamesfredley pushed a commit to branch feature/grails-geb-playwright-local
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 80cb280e5fcdb18024ccbac60a2479faaf2e733e
Author: James Fredley <ja...@users.noreply.github.com>
AuthorDate: Wed Jul 22 13:40:50 2026 -0400
document PlaywrightGebSpec usage in grails-geb README
Describe the local Playwright path, how it differs from ContainerGebSpec,
and how to run the playwright-geb tagged examples.
---
grails-geb/README.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/grails-geb/README.md b/grails-geb/README.md
index f25326fff0..763c8080fc 100644
--- a/grails-geb/README.md
+++ b/grails-geb/README.md
@@ -54,6 +54,21 @@ This will create a new Geb test named `MyFunctionalSpec` in the `src/integration
There are two ways to use this plugin. Either extend your test classes with the `ContainerGebSpec` class or with the `GebSpec` class.
+### PlaywrightGebSpec
+
+`PlaywrightGebSpec` runs Geb against a local headless Playwright Chromium browser, without a Testcontainers browser or a container runtime. Add `geb-direct` alongside the Grails Geb test fixtures, install Chromium with `npx playwright install chromium`, and annotate the integration specification with `@Integration`:
+
+```groovy
+import grails.plugin.geb.PlaywrightGebSpec
+import grails.testing.mixin.integration.Integration
+
+@Integration
+class HomePageSpec extends PlaywrightGebSpec {
+}
+```
+
+The local browser uses `http://localhost:<serverPort>` and includes `server.servlet.context-path` when configured. File uploads use local files directly. Configure Playwright video or tracing in `GebConfig.groovy` through `PlaywrightDriver.config`.
+
### ContainerGebSpec (recommended)
By extending your test classes with `ContainerGebSpec`, your tests will automatically use a containerized browser using [Testcontainers](https://java.testcontainers.org/).