-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.event.EventEmitter,ai.platon.pulsar.crawl.fetch.driver.Browser,java.lang.AutoCloseable
public final class MockBrowser extends AbstractBrowser
-
-
Field Summary
Fields Modifier and Type Field Description private 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 MockBrowser(BrowserId id, LauncherOptions launcherOptions)
-
Method Summary
Modifier and Type Method Description 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()WebDrivernewDriver()-
Methods inherited from class ai.platon.pulsar.protocol.browser.driver.test.MockBrowser
close, destroyDriver, destroyForcibly, maintain, onWillNavigate -
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
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()
-
newDriver
WebDriver newDriver()
-
-
-
-