You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(deps): `geb` v. `7.0` -> `8.0.0`
* fix: adapt to changes in Geb 8
Adapt to changed driver creation logic in Geb 8.
* refactor(geb): simplifications
* docs(geb): improve comments and javadoc
* chore(geb): whitespace
* fix(geb): reset `webdriver.remote.server` after `RemoteWebDriver` init
Reinstate resetting the system property after driver construction.
* docs(geb): minor comment improvement
* fix(geb): prevent cross-thread leakage of `webdriver.remote.server`
Scope the `webdriver.remote.server` System property to the current thread
during `RemoteWebDriver` creation, then restore it. This avoids routing
later sessions to the wrong endpoint in parallel builds.
* fix(geb): allow testing with different browsers
This allows using different browsers in `GebConfig.groovy`
A `configuredBrowser` property has to be set that matches
the browser capabilities used to create the `RemoteWebDriver`
to start the correct container for the browser.
* chore(geb): formatting
* chore(geb): formatting
* refactor(geb): simplify system property override
* docs(geb): improve javadoc and code comments
* fix(geb): resolve trait method conflicts via explicit override
* refactor(geb): simplify
* chore(geb): formatting
* refactor(geb): simplify
* test(geb): update test label
* docs(geb): add `GebConfig` instructions to README
* fix(geb): make inner classes `static`
* feedback(geb): rename property to `containerBrowser`
* chore(geb): formatting
* fix(geb): add message for missing `containerBrowser`
Add a more helpful error message in the case where
a `containerBrowser` property is missing from `GebConfig.groovy`.
* test(geb): make tests more resilient in slow runners
* fix(feedback): skip `containerBrowser` validation
* refactor(geb): extract methods
* fix(geb): move `atCheckWaiting` to CI env variable
* fix(geb): feedback - remove container fallback
Throw exception when `driver` and `containerBrowser`
are mismatched in `GebConfig` instead of falling
back to chrome.
* fix(geb): system property setting of timeout values
* ci: update Geb `atCheckWaiting` system property
* chore(geb): formatting
* fix(geb): use correct `atCheckWaiting` system property
* fix(geb): feedback - use `BigDecimal` in `GrailsGebSettings`
* ci: feedback - set `atCheckWaiting` in build file
Copy file name to clipboardExpand all lines: grails-geb/README.md
+39-1Lines changed: 39 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,18 +135,34 @@ the `container` from within your `ContainerGebSpec` to, for example, call `.copy
135
135
An Example of this can be seen in [ContainerSupport#createFileInputSource utility method](./src/testFixtures/groovy/grails/plugin/geb/support/ContainerSupport.groovy).
136
136
137
137
#### Timeouts
138
-
138
+
The following system properties exist to configure timeouts:
139
+
140
+
*`grails.geb.atCheckWaiting.enabled`
141
+
* purpose: if `at` checks should wait for the page to be in the expected state (uses configured waiting timeout values)
142
+
* type: boolean
143
+
* defaults to `false`
144
+
*`grails.geb.timeouts.retryInterval`
145
+
* purpose: how often to retry waiting operations
146
+
* type: Number
147
+
* defaults to `0.1` seconds
148
+
*`grails.geb.timeouts.waiting`
149
+
* purpose: amount of time to wait for waiting operations
150
+
* type: Number
151
+
* defaults to `5.0` seconds
139
152
*`grails.geb.timeouts.implicitlyWait`
140
153
* purpose: amount of time the driver should wait when searching for an element if it is not immediately present.
154
+
* type: int
141
155
* defaults to `0` seconds, which means that if an element is not found, it will immediately return an error.
142
156
* Warning: Do not mix implicit and explicit waits. Doing so can cause unpredictable wait times.
143
157
Consult the [Geb](https://groovy.apache.org/geb/manual/current/#implicit-assertions-waiting)
144
158
and/or [Selenium](https://www.selenium.dev/documentation/webdriver/waits/) documentation for details.
145
159
*`grails.geb.timeouts.pageLoad`
146
160
* purpose: amount of time to wait for a page load to complete before throwing an error.
161
+
* type: int
147
162
* defaults to `300` seconds
148
163
*`grails.geb.timeouts.script`
149
164
* purpose: amount of time to wait for an asynchronous script to finish execution before throwing an error.
165
+
* type: int
150
166
* defaults to `30` seconds
151
167
152
168
#### Observability and Tracing
@@ -161,6 +177,28 @@ To enable tracing, set the following system property:
161
177
162
178
This allows you to opt in to tracing when an OpenTelemetry collector is available.
163
179
180
+
#### GebConfig.groovy and using non-default browser settings
181
+
Provide a `GebConfig.groovy` on the test runtime classpath (commonly `src/integration-test/resources`, but any location on the test classpath works) to customize the browser.
182
+
183
+
To make this work, ensure:
184
+
1. The `driver` property in your `GebConfig` is a `Closure` that returns a `RemoteWebDriver` instance.
185
+
2. You set a custom `containerBrowser` property so that `ContainerGebSpec` can start a matching container (e.g. "chrome", "edge", "firefox"). For a list of supported browsers, see the [Testcontainers documentation](https://java.testcontainers.org/modules/webdriver_containers/#other-browsers).
186
+
3. Your `build.gradle` includes the driver dependency for the chosen browser.
If you choose to extend `GebSpec`, you will need to have a [Selenium WebDriver](https://www.selenium.dev/documentation/webdriver/browsers/) installed that matches a browser you have installed on your system.
0 commit comments