Class WebDriverContext
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public class WebDriverContext implements AutoCloseable
The web driver context. Web page fetch tasks run in web driver contexts.
-
-
Field Summary
Fields Modifier and Type Field Description private final BooleanisActiveprivate final BooleanisRetiredprivate final BooleanisReadyprivate final BrowserIdbrowserIdprivate final WebDriverPoolManagerdriverPoolManagerprivate final ImmutableConfigconf
-
Constructor Summary
Constructors Constructor Description WebDriverContext(BrowserId browserId, WebDriverPoolManager driverPoolManager, ImmutableConfig conf)
-
Method Summary
Modifier and Type Method Description BooleanisActive()BooleanisRetired()BooleanisReady()final BrowserIdgetBrowserId()final WebDriverPoolManagergetDriverPoolManager()final ImmutableConfiggetConf()final FetchResultrun(FetchTask task, SuspendFunction2<FetchTask, WebDriver, FetchResult> browseFun)Run a web driver task. Unitmaintain()Unitclose()Closing call stack:PrivacyContextManager. -
-
Constructor Detail
-
WebDriverContext
WebDriverContext(BrowserId browserId, WebDriverPoolManager driverPoolManager, ImmutableConfig conf)
-
-
Method Detail
-
getBrowserId
final BrowserId getBrowserId()
-
getDriverPoolManager
final WebDriverPoolManager getDriverPoolManager()
-
getConf
final ImmutableConfig getConf()
-
run
final FetchResult run(FetchTask task, SuspendFunction2<FetchTask, WebDriver, FetchResult> browseFun)
Run a web driver task. This method should not throw any WebDriverException.
-
maintain
Unit maintain()
-
close
Unit close()
Closing call stack:
PrivacyContextManager.close -> PrivacyContext.close -> WebDriverContext.close -> WebDriverPoolManager.close -> BrowserManager.close -> Browser.close -> WebDriver.close |-> LoadingWebDriverPool.close
-
-
-
-