-
- All Implemented Interfaces:
-
ai.platon.pulsar.crawl.fetch.driver.WebDriver,java.io.Closeable,java.lang.AutoCloseable,kotlin.Comparable
public final class ChromeDevtoolsDriver extends AbstractWebDriver
-
-
Field Summary
Fields Modifier and Type Field Description private final BrowserTypebrowserTypeprivate final Function1<String, Long>delayPolicyprivate final IntegeropenSequenceprivate final DurationchromeTabTimeoutprivate final StringuserAgentprivate final BooleanenableUrlBlockingprivate final BooleanisSPAprivate final AtomicIntegersessionLostsprivate InstantlastActiveTimeprivate final BooleanisGoneprivate final BooleanisActiveprivate final StringsessionIdprivate final ChromeDevtoolsBrowserInstancebrowserInstanceprivate final BrowserInstanceIdbrowserInstanceIdprivate final Integeridprivate DurationidleTimeoutprivate final BooleanisCanceledprivate final BooleanisCrashedprivate final BooleanisFreeprivate final BooleanisIdleprivate final BooleanisMockedPageSourceprivate final BooleanisNotWorkingprivate final BooleanisQuitprivate final BooleanisRetiredprivate final BooleanisWorkingprivate final Stringnameprivate final AtomicReference<AbstractWebDriver.Status>statusprivate final BooleansupportJavascriptprivate Stringurlprivate DurationwaitForTimeout
-
Constructor Summary
Constructors Constructor Description ChromeDevtoolsDriver(WebDriverSettings browserSettings, ChromeDevtoolsBrowserInstance browserInstance)
-
Method Summary
-
Methods inherited from class ai.platon.pulsar.protocol.browser.driver.cdt.ChromeDevtoolsDriver
allAttrs, allTexts, cancel, compareTo, equals, evaluateSilently, firstAttr, firstText, free, hashCode, loadResource, newSession, outerHTML, retire, scrollDown, scrollUp, startWork, waitForNavigation, waitForNavigation, waitForSelector, waitForSelector -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ChromeDevtoolsDriver
ChromeDevtoolsDriver(WebDriverSettings browserSettings, ChromeDevtoolsBrowserInstance browserInstance)
-
-
Method Detail
-
getBrowserType
BrowserType getBrowserType()
-
getDelayPolicy
Function1<String, Long> getDelayPolicy()
-
getOpenSequence
final Integer getOpenSequence()
-
getChromeTabTimeout
final Duration getChromeTabTimeout()
-
getUserAgent
final String getUserAgent()
-
getEnableUrlBlocking
final Boolean getEnableUrlBlocking()
-
getSessionLosts
final AtomicInteger getSessionLosts()
-
getLastActiveTime
Instant getLastActiveTime()
-
setLastActiveTime
Unit setLastActiveTime(Instant lastActiveTime)
-
getIsActive
final Boolean getIsActive()
-
getSessionId
String getSessionId()
-
getBrowserInstance
ChromeDevtoolsBrowserInstance getBrowserInstance()
-
getBrowserInstanceId
BrowserInstanceId getBrowserInstanceId()
-
getIdleTimeout
Duration getIdleTimeout()
-
setIdleTimeout
Unit setIdleTimeout(Duration idleTimeout)
-
getIsCanceled
Boolean getIsCanceled()
-
getIsCrashed
final Boolean getIsCrashed()
-
getIsMockedPageSource
Boolean getIsMockedPageSource()
-
getIsNotWorking
final Boolean getIsNotWorking()
-
getIsRetired
Boolean getIsRetired()
-
getIsWorking
final Boolean getIsWorking()
-
getStatus
final AtomicReference<AbstractWebDriver.Status> getStatus()
-
getSupportJavascript
Boolean getSupportJavascript()
-
getWaitForTimeout
final Duration getWaitForTimeout()
-
setWaitForTimeout
final Unit setWaitForTimeout(Duration waitForTimeout)
-
setTimeouts
Unit setTimeouts(BrowserSettings browserSettings)
-
navigateTo
Unit navigateTo(String url)
-
mainRequestHeaders
Map<String, Object> mainRequestHeaders()
-
mainRequestCookies
List<Map<String, String>> mainRequestCookies()
-
getCookies
List<Map<String, String>> getCookies()
-
evaluate
Object evaluate(String expression)
Evaluate a javascript expression in the browser. The expression should be a single line.
-
currentUrl
String currentUrl()
-
waitForSelector
Long waitForSelector(String selector, Duration timeout)
-
waitForNavigation
Long waitForNavigation(Duration timeout)
-
pageSource
String pageSource()
-
bringToFront
Unit bringToFront()
-
-
-
-