-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.event.EventEmitter,ai.platon.pulsar.crawl.fetch.driver.Browser,java.lang.AutoCloseable
public final class ChromeDevtoolsBrowser extends AbstractBrowser
-
-
Field Summary
Fields Modifier and Type Field Description private final RemoteChromechromeprivate final BrowserSettingsbrowserSettingsprivate final ScriptConfuserconfuserprivate final Map<String, WebDriver>driversprivate Function1<Throwable, Unit>eventExceptionHandlerprivate final BrowserIdidprivate final DurationidleTimeoutprivate final BooleanisGUIprivate final BooleanisIdleprivate final Map<BrowserEvents, List<Function<Object>>>listenersprivate final List<NavigateEntry>navigateHistoryprivate final ScriptLoaderscriptLoaderprivate final StringuserAgent
-
Constructor Summary
Constructors Constructor Description ChromeDevtoolsBrowser(BrowserId id, RemoteChrome chrome, ChromeLauncher launcher)
-
Method Summary
Modifier and Type Method Description final RemoteChromegetChrome()final BrowserSettingsgetBrowserSettings()final ScriptConfusergetConfuser()Map<String, WebDriver>getDrivers()final Function1<Throwable, Unit>getEventExceptionHandler()final UnitsetEventExceptionHandler(Function1<Throwable, Unit> eventExceptionHandler)BrowserIdgetId()final DurationgetIdleTimeout()final BooleangetIsGUI()BooleangetIsIdle()final Map<BrowserEvents, List<Function<Object>>>getListeners()List<NavigateEntry>getNavigateHistory()final ScriptLoadergetScriptLoader()StringgetUserAgent()final ChromeTabcreateTab()final UnitcloseTab(ChromeTab tab)final Array<ChromeTab>listTabs()ChromeDevtoolsDrivernewDriver()final ChromeDevtoolsDriverfindDriver(String url)UnitdestroyDriver(WebDriver driver)Unitmaintain()UnitdestroyForcibly()Unitclose()Closing call stack:PrivacyContextManager.close -> PrivacyContext.close -> WebDriverContext.close -> WebDriverPoolManager.close -> BrowserManager.close -> Browser.close -> WebDriver.close |-> LoadingWebDriverPool. -
Methods inherited from class ai.platon.pulsar.crawl.fetch.driver.Browser
count, emit, emit, emit, emit, emit1, emit1, emit1, emit1, hasListeners, hasNormalListeners, hasSuspendListeners, listeners, listeners, normalListeners, normalListeners, off, off, off, off, off, off1, off1, off1, off1, off1, on, on, on, on, on1, on1, on1, on1, once, once, once, once1, once1, once1, suspendListeners, suspendListeners -
Methods inherited from class ai.platon.pulsar.protocol.browser.driver.cdt.ChromeDevtoolsBrowser
onWillNavigate -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getChrome
final RemoteChrome getChrome()
-
getBrowserSettings
final BrowserSettings getBrowserSettings()
-
getConfuser
final ScriptConfuser getConfuser()
-
getDrivers
Map<String, WebDriver> getDrivers()
-
getEventExceptionHandler
final Function1<Throwable, Unit> getEventExceptionHandler()
-
setEventExceptionHandler
final Unit setEventExceptionHandler(Function1<Throwable, Unit> eventExceptionHandler)
-
getId
BrowserId getId()
-
getIdleTimeout
final Duration getIdleTimeout()
-
getListeners
final Map<BrowserEvents, List<Function<Object>>> getListeners()
-
getNavigateHistory
List<NavigateEntry> getNavigateHistory()
-
getScriptLoader
final ScriptLoader getScriptLoader()
-
getUserAgent
String getUserAgent()
-
createTab
@Synchronized() final ChromeTab createTab()
-
closeTab
@Synchronized() final Unit closeTab(ChromeTab tab)
-
listTabs
@Synchronized() final Array<ChromeTab> listTabs()
-
newDriver
@Synchronized() ChromeDevtoolsDriver newDriver()
-
findDriver
@Synchronized() final ChromeDevtoolsDriver findDriver(String url)
-
destroyDriver
Unit destroyDriver(WebDriver driver)
-
destroyForcibly
Unit destroyForcibly()
-
-
-
-