-
- All Implemented Interfaces:
-
ai.platon.pulsar.crawl.fetch.driver.WebDriver,java.io.Closeable,java.lang.AutoCloseable,kotlin.Comparable
public final class MockWebDriver extends AbstractWebDriver
-
-
Field Summary
Fields Modifier and Type Field Description private StringmockPageSourceprivate final WebDriverrealDriverprivate final BrowserTypebrowserTypeprivate final BooleansupportJavascriptprivate final BooleanisMockedPageSourceprivate final StringsessionIdprivate final StringcurrentUrlprivate final StringpageSourceprivate final BrowserInstanceIdbrowserInstanceIdprivate final Integeridprivate DurationidleTimeoutprivate final BooleanisCanceledprivate final BooleanisCrashedprivate final BooleanisFreeprivate final BooleanisIdleprivate final BooleanisNotWorkingprivate final BooleanisQuitprivate final BooleanisRetiredprivate final BooleanisWorkingprivate InstantlastActiveTimeprivate final Stringnameprivate ProxyEntryproxyEntryprivate final AtomicReference<AbstractWebDriver.Status>statusprivate Stringurl
-
Constructor Summary
Constructors Constructor Description MockWebDriver(BrowserInstanceId browserInstanceId, Function0<ChromeDevtoolsDriver> backupDriverCreator)
-
Method Summary
-
Methods inherited from class ai.platon.pulsar.protocol.browser.driver.test.MockWebDriver
cancel, compareTo, equals, evaluateSilently, free, hashCode, retire, startWork -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MockWebDriver
MockWebDriver(BrowserInstanceId browserInstanceId, Function0<ChromeDevtoolsDriver> backupDriverCreator)
-
-
Method Detail
-
getMockPageSource
final String getMockPageSource()
-
setMockPageSource
final Unit setMockPageSource(String mockPageSource)
-
getRealDriver
final WebDriver getRealDriver()
-
getBrowserType
BrowserType getBrowserType()
-
getSupportJavascript
Boolean getSupportJavascript()
-
getIsMockedPageSource
Boolean getIsMockedPageSource()
-
getSessionId
String getSessionId()
-
getCurrentUrl
String getCurrentUrl()
-
getPageSource
String getPageSource()
-
getBrowserInstanceId
BrowserInstanceId getBrowserInstanceId()
-
getIdleTimeout
Duration getIdleTimeout()
-
setIdleTimeout
Unit setIdleTimeout(Duration idleTimeout)
-
getIsCanceled
Boolean getIsCanceled()
-
getIsCrashed
final Boolean getIsCrashed()
-
getIsNotWorking
final Boolean getIsNotWorking()
-
getIsRetired
Boolean getIsRetired()
-
getIsWorking
final Boolean getIsWorking()
-
getLastActiveTime
Instant getLastActiveTime()
-
setLastActiveTime
Unit setLastActiveTime(Instant lastActiveTime)
-
getProxyEntry
final ProxyEntry getProxyEntry()
-
setProxyEntry
final Unit setProxyEntry(ProxyEntry proxyEntry)
-
getStatus
final AtomicReference<AbstractWebDriver.Status> getStatus()
-
setTimeouts
Unit setTimeouts(BrowserSettings driverConfig)
-
navigateTo
Unit navigateTo(String url)
-
stopLoading
Unit stopLoading()
-
bringToFront
Unit bringToFront()
-
-
-
-