-
- All Implemented Interfaces:
-
ai.platon.pulsar.crawl.fetch.driver.WebDriver,java.io.Closeable,java.lang.AutoCloseable,kotlin.Comparable
public abstract class AbstractWebDriver implements Comparable<AbstractWebDriver>, WebDriver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumAbstractWebDriver.Status
-
Field Summary
Fields Modifier and Type Field Description private ProxyEntryproxyEntryprivate DurationwaitForTimeoutprivate InstantlastActiveTimeprivate DurationidleTimeoutprivate final Stringnameprivate Stringurlprivate final BooleansupportJavascriptprivate final BooleanisMockedPageSourceprivate final AtomicReference<AbstractWebDriver.Status>statusprivate final BooleanisFreeprivate final BooleanisWorkingprivate final BooleanisNotWorkingprivate final BooleanisCrashedprivate final BooleanisRetiredprivate final BooleanisCanceledprivate final BooleanisQuitprivate final BrowserInstanceIdbrowserInstanceIdprivate final Integeridprivate final BooleanisIdleprivate final BrowserTypebrowserTypeprivate final StringsessionIdprivate final Function1<String, Long>delayPolicy
-
Constructor Summary
Constructors Constructor Description AbstractWebDriver(BrowserInstanceId browserInstanceId, Integer id)
-
Method Summary
-
Methods inherited from class ai.platon.pulsar.crawl.fetch.driver.AbstractWebDriver
bringToFront, click, currentUrl, evaluate, exists, navigateTo, pageSource, quit, setTimeouts, stopLoading, type, waitFor -
Methods inherited from class ai.platon.pulsar.crawl.fetch.driver.WebDriver
close -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
AbstractWebDriver
AbstractWebDriver(BrowserInstanceId browserInstanceId, Integer id)
-
-
Method Detail
-
getProxyEntry
final ProxyEntry getProxyEntry()
-
setProxyEntry
final Unit setProxyEntry(ProxyEntry proxyEntry)
-
getWaitForTimeout
final Duration getWaitForTimeout()
-
setWaitForTimeout
final Unit setWaitForTimeout(Duration waitForTimeout)
-
getLastActiveTime
Instant getLastActiveTime()
-
setLastActiveTime
Unit setLastActiveTime(Instant lastActiveTime)
-
getIdleTimeout
Duration getIdleTimeout()
-
setIdleTimeout
Unit setIdleTimeout(Duration idleTimeout)
-
getUrl
String getUrl()
The url to navigate The browser might redirect, so it might not be the same with currentUrl()
-
setUrl
Unit setUrl(String url)
The url to navigate The browser might redirect, so it might not be the same with currentUrl()
-
getSupportJavascript
Boolean getSupportJavascript()
Whether the web driver has javascript support
-
getIsMockedPageSource
Boolean getIsMockedPageSource()
Whether the web page source is mocked
-
getStatus
final AtomicReference<AbstractWebDriver.Status> getStatus()
Driver status
-
getIsWorking
final Boolean getIsWorking()
-
getIsNotWorking
final Boolean getIsNotWorking()
-
getIsCrashed
final Boolean getIsCrashed()
-
getIsRetired
Boolean getIsRetired()
-
getIsCanceled
Boolean getIsCanceled()
-
getBrowserInstanceId
BrowserInstanceId getBrowserInstanceId()
-
getBrowserType
abstract BrowserType getBrowserType()
-
getSessionId
abstract String getSessionId()
-
getDelayPolicy
Function1<String, Long> getDelayPolicy()
-
evaluateSilently
Object evaluateSilently(String expression)
-
compareTo
Integer compareTo(AbstractWebDriver other)
-
-
-
-