puppito
Start devito along with a puppeteer connection to it.
npm i puppito
|
pnpm add puppito
|
yarn add puppito
|
API
# createIncognitoBrowserContext
(options)
# options
createIncognitoBrowserContext(options) =>
-
Promise<BrowserContext>
# options
waitForTarget(predicate, options) =>
-
Promise<Target>
# $$eval
(selector, pageFunction, args)
$$eval<Selector, Params, Func extends EvaluateFunc<[ NodeFor<Selector> [], rest ]>>(selector, pageFunction, args) =>
-
Promise<Awaited<ReturnType<Func>>>
# $eval
(selector, pageFunction, args)
$eval<Selector, Params, Func extends EvaluateFunc<[ ElementHandle<NodeFor<Selector>>, rest ]>>(selector, pageFunction, args) =>
-
Promise<Awaited<ReturnType<Func>>>
# addScriptTag
(options)
# options
addScriptTag(options) =>
-
Promise<ElementHandle<HTMLScriptElement>>
click(selector, { button, clickCount, delay }) =>
-
Promise<void>
# evaluate
(pageFunction, args)
evaluate<Params, Func extends EvaluateFunc<Params>>(pageFunction, args) =>
-
Promise<Awaited<ReturnType<Func>>>
# evaluateHandle
(pageFunction, args)
evaluateHandle<Params, Func extends EvaluateFunc<Params>>(pageFunction, args) =>
# goto
(url, { referer, timeout, waitUntil })
goto(url, { referer, timeout, waitUntil }) =>
-
Promise<
null
| HTTPResponse># select
(selector, values)
# setContent
(html, { timeout, waitUntil })
setContent(html, { timeout, waitUntil }) =>
-
Promise<void>
type(selector, text, { delay }) =>
-
Promise<void>
# waitForFunction
(pageFunction, options, args)
# options
waitForFunction<Params, Func extends EvaluateFunc<Params>>(pageFunction, options, args) =>
waitForNavigation({ timeout, waitUntil }) =>
-
Promise<
null
| HTTPResponse># waitForSelector
(selector, options)
# options
waitForSelector<Selector>(selector, options) =>
-
Promise<
null
| ElementHandle<NodeFor<Selector>>># waitForXPath
(xpath, options)
# xpath
string
# options
waitForXPath(xpath, options) =>
-
Promise<
null
| ElementHandle<Node>># $$eval
(selector, pageFunction, args)
$$eval<Selector, Params, Func extends EvaluateFunc<[ NodeFor<Selector> [], rest ]>>(selector, pageFunction, args) =>
-
Promise<Awaited<ReturnType<Func>>>
# $eval
(selector, pageFunction, args)
$eval<Selector, Params, Func extends EvaluateFunc<[ ElementHandle<NodeFor<Selector>>, rest ]>>(selector, pageFunction, args) =>
-
Promise<Awaited<ReturnType<Func>>>
addScriptTag({ content, id, path, type, url }) =>
-
Promise<ElementHandle<HTMLScriptElement>>
addStyleTag({ content, path, url }) =>
-
Promise<ElementHandle<Node>>
click(selector, { button, clickCount, delay }) =>
-
Promise<void>
close({ runBeforeUnload }) =>
-
Promise<void>
emulate({ userAgent, viewport }) =>
-
Promise<void>
emulateIdleState({ isScreenUnlocked, isUserActive }) =>
-
Promise<void>
# emulateMediaFeatures
(features)
# features
MediaFeature []
emulateMediaFeatures(features) =>
-
Promise<void>
# emulateNetworkConditions
(networkConditions)
# networkConditions
null
| NetworkConditions
emulateNetworkConditions(networkConditions) =>
-
Promise<void>
# emulateVisionDeficiency
(type)
# type
"none"
| "achromatopsia"
| "blurredVision"
| "deuteranopia"
| "protanopia"
| "tritanopia"
emulateVisionDeficiency(type) =>
-
Promise<void>
# evaluate
(pageFunction, args)
evaluate<Params, Func extends EvaluateFunc<Params>>(pageFunction, args) =>
-
Promise<Awaited<ReturnType<Func>>>
# evaluateHandle
(pageFunction, args)
evaluateHandle<Params, Func extends EvaluateFunc<Params>>(pageFunction, args) =>
# evaluateOnNewDocument
(pageFunction, args)
evaluateOnNewDocument<Params, Func>(pageFunction, args) =>
-
Promise<void>
exposeFunction(name, pptrFunction) =>
-
Promise<void>
goto(url, options) =>
-
Promise<
null
| HTTPResponse>off<K>(eventName, handler) =>
on<K>(eventName, handler) =>
once<K>(eventName, handler) =>
# queryObjects
(prototypeHandle)
# select
(selector, values)
# setExtraHTTPHeaders
(headers)
# headers
Record<string, string>
setExtraHTTPHeaders(headers) =>
-
Promise<void>
# setUserAgent
(userAgent, userAgentMetadata)
type(selector, text, { delay }) =>
-
Promise<void>
waitForFrame(urlOrPredicate, { timeout }) =>
-
Promise<Frame>
waitForFunction<Params, Func extends EvaluateFunc<Params>>(pageFunction, { polling, timeout }, args) =>
waitForNetworkIdle({ idleTime, timeout }) =>
-
Promise<void>
# waitForRequest
(urlOrPredicate, { timeout })
waitForRequest(urlOrPredicate, { timeout }) =>
-
Promise<HTTPRequest>
# waitForResponse
(urlOrPredicate, { timeout })
waitForResponse(urlOrPredicate, { timeout }) =>
-
Promise<HTTPResponse>
# waitForSelector
(selector, options)
# options
waitForSelector<Selector>(selector, options) =>
-
Promise<
null
| ElementHandle<NodeFor<Selector>>>waitForXPath(xpath, { hidden, timeout, visible }) =>
-
Promise<
null
| ElementHandle<Node>># Protocol
# Accessibility
# AXPropertyName
"busy"
| "disabled"
| "editable"
| "focusable"
| "focused"
| "hidden"
| "hiddenRoot"
| "invalid"
| "keyshortcuts"
| "settable"
| "roledescription"
| "live"
| "atomic"
| "relevant"
| "root"
| "autocomplete"
| "hasPopup"
| "level"
| "multiselectable"
| "orientation"
| "multiline"
| "readonly"
| "required"
| "valuemin"
| "valuemax"
| "valuetext"
| "checked"
| "expanded"
| "modal"
| "pressed"
| "selected"
| "activedescendant"
| "controls"
| "describedby"
| "details"
| "errormessage"
| "flowto"
| "labelledby"
| "owns"
# AXValueNativeSourceType
"description"
| "figcaption"
| "label"
| "labelfor"
| "labelwrapped"
| "legend"
| "rubyannotation"
| "tablecaption"
| "title"
| "other"
# AXValueSourceType
"attribute"
| "implicit"
| "style"
| "contents"
| "placeholder"
| "relatedElement"
# AXValueType
"boolean"
| "tristate"
| "booleanOrUndefined"
| "idref"
| "idrefList"
| "integer"
| "node"
| "nodeList"
| "number"
| "string"
| "computedString"
| "token"
| "tokenList"
| "domRelation"
| "role"
| "internalRole"
| "valueUndefined"
# Animation
# Audits
# AttributionReportingIssueType
"PermissionPolicyDisabled"
| "AttributionSourceUntrustworthyOrigin"
| "AttributionUntrustworthyOrigin"
| "InvalidHeader"
# BlockedByResponseReason
"CoepFrameResourceNeedsCoepHeader"
| "CoopSandboxedIFrameCannotNavigateToCoopPage"
| "CorpNotSameOrigin"
| "CorpNotSameOriginAfterDefaultedToSameOriginByCoep"
| "CorpNotSameSite"
# ContentSecurityPolicyViolationType
"kInlineViolation"
| "kEvalViolation"
| "kURLViolation"
| "kTrustedTypesSinkViolation"
| "kTrustedTypesPolicyViolation"
| "kWasmEvalViolation"
# CookieExclusionReason
"ExcludeSameSiteUnspecifiedTreatedAsLax"
| "ExcludeSameSiteNoneInsecure"
| "ExcludeSameSiteLax"
| "ExcludeSameSiteStrict"
| "ExcludeInvalidSameParty"
| "ExcludeSamePartyCrossPartyContext"
# CookieWarningReason
"WarnSameSiteUnspecifiedCrossSiteContext"
| "WarnSameSiteNoneInsecure"
| "WarnSameSiteUnspecifiedLaxAllowUnsafe"
| "WarnSameSiteStrictLaxDowngradeStrict"
| "WarnSameSiteStrictCrossDowngradeStrict"
| "WarnSameSiteStrictCrossDowngradeLax"
| "WarnSameSiteLaxCrossDowngradeStrict"
| "WarnSameSiteLaxCrossDowngradeLax"
| "WarnAttributeValueExceedsMaxSize"
# DeprecationIssueType
"AuthorizationCoveredByWildcard"
| "CanRequestURLHTTPContainingNewline"
| "ChromeLoadTimesConnectionInfo"
| "ChromeLoadTimesFirstPaintAfterLoadTime"
| "ChromeLoadTimesWasAlternateProtocolAvailable"
| "CookieWithTruncatingChar"
| "CrossOriginAccessBasedOnDocumentDomain"
| "CrossOriginWindowAlert"
| "CrossOriginWindowConfirm"
| "CSSSelectorInternalMediaControlsOverlayCastButton"
| "DeprecationExample"
| "DocumentDomainSettingWithoutOriginAgentClusterHeader"
| "EventPath"
| "GeolocationInsecureOrigin"
| "GeolocationInsecureOriginDeprecatedNotRemoved"
| "GetUserMediaInsecureOrigin"
| "HostCandidateAttributeGetter"
| "IdentityInCanMakePaymentEvent"
| "InsecurePrivateNetworkSubresourceRequest"
| "LegacyConstraintGoogIPv6"
| "LocalCSSFileExtensionRejected"
| "MediaSourceAbortRemove"
| "MediaSourceDurationTruncatingBuffered"
| "NoSysexWebMIDIWithoutPermission"
| "NotificationInsecureOrigin"
| "NotificationPermissionRequestedIframe"
| "ObsoleteWebRtcCipherSuite"
| "OpenWebDatabaseInsecureContext"
| "PictureSourceSrc"
| "PrefixedCancelAnimationFrame"
| "PrefixedRequestAnimationFrame"
| "PrefixedStorageInfo"
| "PrefixedVideoDisplayingFullscreen"
| "PrefixedVideoEnterFullscreen"
| "PrefixedVideoEnterFullScreen"
| "PrefixedVideoExitFullscreen"
| "PrefixedVideoExitFullScreen"
| "PrefixedVideoSupportsFullscreen"
| "RangeExpand"
| "RequestedSubresourceWithEmbeddedCredentials"
| "RTCConstraintEnableDtlsSrtpFalse"
| "RTCConstraintEnableDtlsSrtpTrue"
| "RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics"
| "RTCPeerConnectionSdpSemanticsPlanB"
| "RtcpMuxPolicyNegotiate"
| "SharedArrayBufferConstructedWithoutIsolation"
| "TextToSpeech_DisallowedByAutoplay"
| "V8SharedArrayBufferConstructedInExtensionWithoutIsolation"
| "XHRJSONEncodingDetection"
| "XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload"
| "XRSupportsSession"
# FederatedAuthRequestIssueReason
"ApprovalDeclined"
| "TooManyRequests"
| "ManifestListHttpNotFound"
| "ManifestListNoResponse"
| "ManifestListInvalidResponse"
| "ManifestNotInManifestList"
| "ManifestListTooBig"
| "ManifestHttpNotFound"
| "ManifestNoResponse"
| "ManifestInvalidResponse"
| "ClientMetadataHttpNotFound"
| "ClientMetadataNoResponse"
| "ClientMetadataInvalidResponse"
| "ClientMetadataMissingPrivacyPolicyUrl"
| "DisabledInSettings"
| "ErrorFetchingSignin"
| "InvalidSigninResponse"
| "AccountsHttpNotFound"
| "AccountsNoResponse"
| "AccountsInvalidResponse"
| "IdTokenHttpNotFound"
| "IdTokenNoResponse"
| "IdTokenInvalidResponse"
| "IdTokenInvalidRequest"
| "ErrorIdToken"
| "Canceled"
# InspectorIssueCode
"CookieIssue"
| "MixedContentIssue"
| "BlockedByResponseIssue"
| "HeavyAdIssue"
| "ContentSecurityPolicyIssue"
| "SharedArrayBufferIssue"
| "TrustedWebActivityIssue"
| "LowTextContrastIssue"
| "CorsIssue"
| "AttributionReportingIssue"
| "QuirksModeIssue"
| "NavigatorUserAgentIssue"
| "GenericIssue"
| "DeprecationIssue"
| "ClientHintIssue"
| "FederatedAuthRequestIssue"
# MixedContentResolutionStatus
"MixedContentBlocked"
| "MixedContentAutomaticallyUpgraded"
| "MixedContentWarning"
# MixedContentResourceType
"AttributionSrc"
| "Audio"
| "Beacon"
| "CSPReport"
| "Download"
| "EventSource"
| "Favicon"
| "Font"
| "Form"
| "Frame"
| "Image"
| "Import"
| "Manifest"
| "Ping"
| "PluginData"
| "PluginResource"
| "Prefetch"
| "Resource"
| "Script"
| "ServiceWorker"
| "SharedWorker"
| "Stylesheet"
| "Track"
| "Video"
| "Worker"
| "XMLHttpRequest"
| "XSLT"
# BackgroundService
# Browser
# PermissionType
"accessibilityEvents"
| "audioCapture"
| "backgroundSync"
| "backgroundFetch"
| "clipboardReadWrite"
| "clipboardSanitizedWrite"
| "displayCapture"
| "durableStorage"
| "flash"
| "geolocation"
| "midi"
| "midiSysex"
| "nfc"
| "notifications"
| "paymentHandler"
| "periodicBackgroundSync"
| "protectedMediaIdentifier"
| "sensors"
| "videoCapture"
| "videoCapturePanTiltZoom"
| "idleDetection"
| "wakeLockScreen"
| "wakeLockSystem"