Class BrowserManager
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public class BrowserManager implements AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description BrowserManager(ImmutableConfig conf)
-
Method Summary
Modifier and Type Method Description final Map<BrowserId, Browser>getBrowsers()The active browsers final ImmutableConfiggetConf()final Browserlaunch(BrowserId browserId, WebDriverSettings driverSettings, Map<String, Object> capabilities)Launch a browser. final BrowserfindBrowser(BrowserId browserId)Find an existing browser. final UnitcloseBrowser(BrowserId browserId)Close a browser. final UnitcloseBrowser(Browser browser)final UnitdestroyBrowserForcibly(BrowserId browserId)final UnitcloseDriver(WebDriver driver)final WebDriverfindLeastValuableDriver()final UnitcloseLeastValuableDriver()final UnitdestroyZombieBrowsersForcibly()Destroy the zombie browsers forcibly, kill the associated browser processes, release all allocated resources, regardless of whether the browser is closed or not. final Unitmaintain()Unitclose()-
-
Method Detail
-
getBrowsers
final Map<BrowserId, Browser> getBrowsers()
The active browsers
-
getConf
final ImmutableConfig getConf()
-
launch
final Browser launch(BrowserId browserId, WebDriverSettings driverSettings, Map<String, Object> capabilities)
Launch a browser. If the browser with the id is already launched, return the existing one.
-
findBrowser
@Synchronized() final Browser findBrowser(BrowserId browserId)
Find an existing browser.
-
closeBrowser
@Synchronized() final Unit closeBrowser(BrowserId browserId)
Close a browser.
-
closeBrowser
@Synchronized() final Unit closeBrowser(Browser browser)
-
destroyBrowserForcibly
@Synchronized() final Unit destroyBrowserForcibly(BrowserId browserId)
-
closeDriver
@Synchronized() final Unit closeDriver(WebDriver driver)
-
findLeastValuableDriver
@Synchronized() final WebDriver findLeastValuableDriver()
-
closeLeastValuableDriver
@Synchronized() final Unit closeLeastValuableDriver()
-
destroyZombieBrowsersForcibly
@Synchronized() final Unit destroyZombieBrowsersForcibly()
Destroy the zombie browsers forcibly, kill the associated browser processes, release all allocated resources, regardless of whether the browser is closed or not.
-
close
@Synchronized() Unit close()
-
-
-
-