-
- All Implemented Interfaces:
-
ai.platon.pulsar.crawl.fetch.driver.WebDriver,java.io.Closeable,java.lang.AutoCloseable,kotlin.Comparable
public final class WebDriverAdapter extends AbstractWebDriver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classWebDriverAdapter.Companion
-
Field Summary
Fields Modifier and Type Field Description private final AtomicIntegerpageViewsprivate final StringsessionIdprivate final BrowserTypebrowserTypeprivate final BooleansupportJavascriptprivate final BooleanisMockedPageSourceprivate final WebDriverdriverprivate final Integerpriorityprivate final BrowserInstanceIdbrowserInstanceIdprivate final Function1<String, Long>delayPolicyprivate final Integeridprivate DurationidleTimeoutprivate final BooleanisCanceledprivate final BooleanisCrashedprivate final BooleanisFreeprivate final BooleanisIdleprivate final BooleanisNotWorkingprivate final BooleanisQuitprivate final BooleanisRetiredprivate final BooleanisWorkingprivate InstantlastActiveTimeprivate final Stringnameprivate final AtomicReference<AbstractWebDriver.Status>statusprivate Stringurlprivate DurationwaitForTimeout
-
Constructor Summary
Constructors Constructor Description WebDriverAdapter(BrowserInstanceId browserInstanceId, WebDriver driver, Integer priority)
-
Method Summary
-
Methods inherited from class ai.platon.pulsar.protocol.browser.driver.WebDriverAdapter
allAttrs, allTexts, cancel, compareTo, equals, evaluateSilently, firstAttr, firstText, free, hashCode, newSession, outerHTML, retire, scrollDown, scrollUp, startWork, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
WebDriverAdapter
WebDriverAdapter(BrowserInstanceId browserInstanceId, WebDriver driver, Integer priority)
-
-
Method Detail
-
getPageViews
final AtomicInteger getPageViews()
-
getSessionId
String getSessionId()
-
getBrowserType
BrowserType getBrowserType()
-
getSupportJavascript
Boolean getSupportJavascript()
-
getIsMockedPageSource
Boolean getIsMockedPageSource()
-
getDriver
final WebDriver getDriver()
-
getPriority
final Integer getPriority()
-
getBrowserInstanceId
BrowserInstanceId getBrowserInstanceId()
-
getDelayPolicy
Function1<String, Long> getDelayPolicy()
-
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)
-
getStatus
final AtomicReference<AbstractWebDriver.Status> getStatus()
-
getWaitForTimeout
final Duration getWaitForTimeout()
-
setWaitForTimeout
final Unit setWaitForTimeout(Duration waitForTimeout)
-
currentUrl
String currentUrl()
The actual url return by the browser
-
pageSource
String pageSource()
The real time page source return by the browser
-
navigateTo
Unit navigateTo(String url)
Navigate to the url The browser might redirect, so it might not be the same to currentUrl
-
getCookies
List<Map<String, String>> getCookies()
-
bringToFront
Unit bringToFront()
-
setTimeouts
Unit setTimeouts(BrowserSettings driverConfig)
-
-
-
-