@groovy.util.logging.Slf4j @groovy.transform.CompileStatic class WebDriverContainerHolder extends java.lang.Object
Responsible for initializing a org.testcontainers.containers.BrowserWebDriverContainer per the Spec's ContainerGebConfiguration. This class will try to reuse the same container if the configuration matches the current container.
Modifiers | Name | Description |
---|---|---|
class |
WebDriverContainerHolder.1 |
Constructor and description |
---|
WebDriverContainerHolder(GrailsGebSettings grailsGebSettings) |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
getHostNameFromHost() Returns the hostname that the server under test is available on from the host. |
|
boolean |
isInitialized() |
|
boolean |
matchesCurrentContainerConfiguration(WebDriverContainerHolder.WebDriverContainerConfiguration specConfiguration) |
|
void |
restartVncRecordingContainer() Workaround for https://github.com/testcontainers/testcontainers-java/issues/3998 Restarts the VNC recording container to enable separate recording files for each test method. |
|
void |
setupBrowserUrl(IMethodInvocation invocation) |
|
void |
stop() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Returns the hostname that the server under test is available on from the host.
This is useful when using any of the download*()
methods as they will connect from the host,
and not from within the container.
Defaults to localhost
. If the value returned by webDriverContainer.getHost()
is different from the default, this method will return the same value same as webDriverContainer.getHost()
.
Workaround for https://github.com/testcontainers/testcontainers-java/issues/3998 Restarts the VNC recording container to enable separate recording files for each test method. This method uses reflection to access the VNC recording container field in BrowserWebDriverContainer. Should be called BEFORE each test starts.
Groovy Documentation