Package dev.comfast.cf.se.infra
Class DriverSessionCache
java.lang.Object
dev.comfast.cf.se.infra.DriverSessionCache
Caches WebDriver session to avoid creating new session on each test.
This is useful for debugging, where creating new session and opening given entry in application is expensive.
This class is not thread-safe. Don't use it in parallel tests.
-
Constructor Summary
ConstructorsConstructorDescriptionDriverSessionCache(Supplier<org.openqa.selenium.remote.RemoteWebDriver> newDriverSupplier) -
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.remote.RemoteWebDriverget()Gets WebDriver instance.
-
Constructor Details
-
DriverSessionCache
-
-
Method Details
-
get
public org.openqa.selenium.remote.RemoteWebDriver get()Gets WebDriver instance. If session is cached, it will try to reconnect to it.
-