@opensteer/browser-core 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +386 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -1
- package/dist/index.d.ts +87 -1
- package/dist/index.js +374 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -468,6 +468,66 @@ declare function staleNodeRefError(input: {
|
|
|
468
468
|
declare function closedSessionError(sessionRef: SessionRef): BrowserCoreError;
|
|
469
469
|
declare function closedPageError(pageRef: PageRef): BrowserCoreError;
|
|
470
470
|
|
|
471
|
+
declare const DEFAULT_POST_LOAD_TRACKER_QUIET_WINDOW_MS = 400;
|
|
472
|
+
declare const DEFAULT_ACTION_BOUNDARY_POLL_INTERVAL_MS = 100;
|
|
473
|
+
interface PostLoadTrackerState {
|
|
474
|
+
readonly installedAt: number;
|
|
475
|
+
readonly lastMutationAt: number;
|
|
476
|
+
readonly lastNetworkActivityAt: number;
|
|
477
|
+
readonly lastTrackedNetworkActivityAt: number;
|
|
478
|
+
readonly now: number;
|
|
479
|
+
readonly pendingFetches: number;
|
|
480
|
+
readonly pendingTimeouts: number;
|
|
481
|
+
readonly pendingXhrs: number;
|
|
482
|
+
readonly trackedPendingFetches: number;
|
|
483
|
+
readonly trackedPendingXhrs: number;
|
|
484
|
+
readonly collecting: boolean;
|
|
485
|
+
readonly readyState: string;
|
|
486
|
+
}
|
|
487
|
+
interface PostLoadTrackerSnapshot {
|
|
488
|
+
readonly lastTrackedNetworkActivityAt: number;
|
|
489
|
+
readonly trackedPendingFetches: number;
|
|
490
|
+
readonly trackedPendingXhrs: number;
|
|
491
|
+
}
|
|
492
|
+
declare function normalizePostLoadTrackerState(value: unknown): PostLoadTrackerState | undefined;
|
|
493
|
+
declare function buildPostLoadTrackerInstallScript(): string;
|
|
494
|
+
declare function buildPostLoadTrackerBeginExpression(): string;
|
|
495
|
+
declare function buildPostLoadTrackerFreezeExpression(): string;
|
|
496
|
+
declare function buildPostLoadTrackerReadExpression(): string;
|
|
497
|
+
declare function capturePostLoadTrackerSnapshot(tracker: PostLoadTrackerState): PostLoadTrackerSnapshot;
|
|
498
|
+
declare function postLoadTrackerHasTrackedNetworkActivitySince(snapshot: PostLoadTrackerSnapshot, tracker: PostLoadTrackerState | undefined): boolean;
|
|
499
|
+
declare function postLoadTrackerIsSettled(tracker: PostLoadTrackerState | undefined, quietWindowMs?: number): boolean;
|
|
500
|
+
|
|
501
|
+
declare const CROSS_DOCUMENT_INTERACTION_TIMEOUT_MS = 30000;
|
|
502
|
+
declare const CROSS_DOCUMENT_DETECTION_WINDOW_MS = 500;
|
|
503
|
+
interface ActionBoundarySnapshot {
|
|
504
|
+
readonly pageRef: PageRef;
|
|
505
|
+
readonly documentRef: DocumentRef;
|
|
506
|
+
readonly url?: string;
|
|
507
|
+
readonly tracker?: PostLoadTrackerSnapshot;
|
|
508
|
+
}
|
|
509
|
+
type ActionBoundarySettleTrigger = "dom-action" | "navigation";
|
|
510
|
+
type ActionBoundaryTimedOutPhase = "bootstrap";
|
|
511
|
+
interface ActionBoundaryOutcome {
|
|
512
|
+
readonly trigger: ActionBoundarySettleTrigger;
|
|
513
|
+
readonly crossDocument: boolean;
|
|
514
|
+
readonly bootstrapSettled: boolean;
|
|
515
|
+
readonly timedOutPhase?: ActionBoundaryTimedOutPhase;
|
|
516
|
+
}
|
|
517
|
+
interface WaitForActionBoundaryInput {
|
|
518
|
+
readonly timeoutMs: number;
|
|
519
|
+
readonly signal?: AbortSignal;
|
|
520
|
+
readonly snapshot?: ActionBoundarySnapshot;
|
|
521
|
+
readonly pollIntervalMs?: number;
|
|
522
|
+
getCurrentMainFrameDocumentRef(): DocumentRef | undefined;
|
|
523
|
+
getCurrentPageUrl?(): string | undefined;
|
|
524
|
+
isCurrentMainFrameBootstrapSettled?(): boolean;
|
|
525
|
+
readTrackerState(): Promise<PostLoadTrackerState | undefined>;
|
|
526
|
+
throwBackgroundError(): void;
|
|
527
|
+
isPageClosed(): boolean;
|
|
528
|
+
}
|
|
529
|
+
declare function waitForActionBoundary(input: WaitForActionBoundaryInput): Promise<ActionBoundaryOutcome>;
|
|
530
|
+
|
|
471
531
|
type ConsoleLevel = "debug" | "log" | "info" | "warn" | "error" | "trace";
|
|
472
532
|
interface StepEventBase {
|
|
473
533
|
readonly eventId: string;
|
|
@@ -765,6 +825,9 @@ interface BrowserExecutor {
|
|
|
765
825
|
}
|
|
766
826
|
interface BrowserInspector {
|
|
767
827
|
readonly capabilities: Readonly<BrowserCapabilities>;
|
|
828
|
+
drainEvents(input: {
|
|
829
|
+
readonly pageRef: PageRef;
|
|
830
|
+
}): Promise<readonly StepEvent[]>;
|
|
768
831
|
listPages(input: {
|
|
769
832
|
readonly sessionRef: SessionRef;
|
|
770
833
|
}): Promise<readonly PageInfo[]>;
|
|
@@ -785,12 +848,22 @@ interface BrowserInspector {
|
|
|
785
848
|
readonly frameRef?: FrameRef;
|
|
786
849
|
readonly documentRef?: DocumentRef;
|
|
787
850
|
}): Promise<DomSnapshot>;
|
|
851
|
+
getActionBoundarySnapshot(input: {
|
|
852
|
+
readonly pageRef: PageRef;
|
|
853
|
+
}): Promise<ActionBoundarySnapshot>;
|
|
788
854
|
waitForVisualStability(input: {
|
|
789
855
|
readonly pageRef: PageRef;
|
|
790
856
|
readonly timeoutMs?: number;
|
|
791
857
|
readonly settleMs?: number;
|
|
792
858
|
readonly scope?: VisualStabilityScope;
|
|
793
859
|
}): Promise<void>;
|
|
860
|
+
waitForPostLoadQuiet(input: {
|
|
861
|
+
readonly pageRef: PageRef;
|
|
862
|
+
readonly timeoutMs?: number;
|
|
863
|
+
readonly quietMs?: number;
|
|
864
|
+
readonly captureWindowMs?: number;
|
|
865
|
+
readonly signal?: AbortSignal;
|
|
866
|
+
}): Promise<void>;
|
|
794
867
|
readText(input: NodeLocator): Promise<string | null>;
|
|
795
868
|
readAttributes(input: NodeLocator): Promise<readonly {
|
|
796
869
|
readonly name: string;
|
|
@@ -963,6 +1036,9 @@ declare class FakeBrowserCoreEngine implements BrowserCoreEngine {
|
|
|
963
1036
|
listPages(input: {
|
|
964
1037
|
readonly sessionRef: SessionRef;
|
|
965
1038
|
}): Promise<readonly PageInfo[]>;
|
|
1039
|
+
drainEvents(input: {
|
|
1040
|
+
readonly pageRef: PageRef;
|
|
1041
|
+
}): Promise<readonly StepEvent[]>;
|
|
966
1042
|
listFrames(input: {
|
|
967
1043
|
readonly pageRef: PageRef;
|
|
968
1044
|
}): Promise<readonly FrameInfo[]>;
|
|
@@ -980,12 +1056,22 @@ declare class FakeBrowserCoreEngine implements BrowserCoreEngine {
|
|
|
980
1056
|
readonly frameRef?: FrameRef;
|
|
981
1057
|
readonly documentRef?: DocumentRef;
|
|
982
1058
|
}): Promise<DomSnapshot>;
|
|
1059
|
+
getActionBoundarySnapshot(input: {
|
|
1060
|
+
readonly pageRef: PageRef;
|
|
1061
|
+
}): Promise<ActionBoundarySnapshot>;
|
|
983
1062
|
waitForVisualStability(_input: {
|
|
984
1063
|
readonly pageRef: PageRef;
|
|
985
1064
|
readonly timeoutMs?: number;
|
|
986
1065
|
readonly settleMs?: number;
|
|
987
1066
|
readonly scope?: "main-frame" | "visible-frames";
|
|
988
1067
|
}): Promise<void>;
|
|
1068
|
+
waitForPostLoadQuiet(_input: {
|
|
1069
|
+
readonly pageRef: PageRef;
|
|
1070
|
+
readonly timeoutMs?: number;
|
|
1071
|
+
readonly quietMs?: number;
|
|
1072
|
+
readonly captureWindowMs?: number;
|
|
1073
|
+
readonly signal?: AbortSignal;
|
|
1074
|
+
}): Promise<void>;
|
|
989
1075
|
readText(input: NodeLocator): Promise<string | null>;
|
|
990
1076
|
readAttributes(input: NodeLocator): Promise<readonly {
|
|
991
1077
|
readonly name: string;
|
|
@@ -1132,4 +1218,4 @@ interface VisualStabilityOptions {
|
|
|
1132
1218
|
}
|
|
1133
1219
|
declare function waitForCdpVisualStability(cdp: CdpSessionLike, options?: VisualStabilityOptions): Promise<void>;
|
|
1134
1220
|
|
|
1135
|
-
export { type BodyPayload, type BodyPayloadEncoding, type Brand, type BrowserCapabilities, type BrowserCapabilityPath, type BrowserCoreEngine, BrowserCoreError, type BrowserCoreErrorCode, type BrowserCoreErrorOptions, type BrowserExecutor, type BrowserInitScriptInput, type BrowserInitScriptRegistration, type BrowserInspector, type BrowserInstrumentation, type BrowserRouteFetchResult, type BrowserRouteHandlerResult, type BrowserRouteRegistration, type BrowserRouteRegistrationInput, type BrowserRouteRequest, type CapturedCdpDomSnapshot, type CdpDomSnapshotDocument, type CdpDomTreeNode, type CdpRareIntegerData, type CdpRareStringData, type CdpShadowBoundaryInfo, type ChooserOpenedStepEvent, type ChooserRef, type ConsoleLevel, type ConsoleStepEvent, type CookiePriority, type CookieRecord, type CookieSameSite, type CoordinateSpace, DEFAULT_VISUAL_STABILITY_SETTLE_MS, DEFAULT_VISUAL_STABILITY_TIMEOUT_MS, DOM_SNAPSHOT_COMPUTED_STYLE_NAMES, type DevicePixelRatio, type DialogOpenedStepEvent, type DialogRef, type DocumentEpoch, type DocumentRef, type DomSnapshot, type DomSnapshotNode, type DownloadFinishedStepEvent, type DownloadRef, type DownloadStartedStepEvent, type EventStreamMessageStepEvent, FakeBrowserCoreEngine, type FakeBrowserCoreEngineOptions, type FakeBrowserCorePageSeed, type FrameInfo, type FrameRef, type FrozenStepEvent, type GetNetworkRecordsInput, type HeaderEntry, type HitTestResult, type HtmlSnapshot, type IndexedDbDatabaseSnapshot, type IndexedDbIndexSnapshot, type IndexedDbObjectStoreSnapshot, type IndexedDbRecord, type KeyModifier, type LayoutViewport, type MouseButton, type NetworkCaptureState, type NetworkInitiator, type NetworkInitiatorType, type NetworkRecord, type NetworkRecordFilterInput, type NetworkRecordKind, type NetworkRequestId, type NetworkResourceType, type NetworkSourceMetadata, type NetworkTiming, type NetworkTransferSizes, type NodeLocator, type NodeRef, type PageClosedStepEvent, type PageCreatedStepEvent, type PageErrorStepEvent, type PageInfo, type PageLifecycleState, type PageRef, type PageScaleFactor, type PageZoomFactor, type PartialBrowserCapabilities, type PausedStepEvent, type Point, type PopupOpenedStepEvent, type Quad, type Rect, type ResumedStepEvent, type ScreenshotArtifact, type ScreenshotFormat, type ScrollOffset, type SessionRef, type SessionStorageSnapshot, type SessionTransportExecutor, type SessionTransportRequest, type SessionTransportResponse, type ShadowDomSnapshotMode, type Size, type StepEvent, type StepResult, type StorageEntry, type StorageOriginSnapshot, type StorageSnapshot, type ViewportMetrics, type VisualStabilityScope, type VisualViewport, type WebSocketClosedStepEvent, type WebSocketFrameStepEvent, type WebSocketOpenedStepEvent, type WorkerCreatedStepEvent, type WorkerDestroyedStepEvent, type WorkerRef, allBrowserCapabilities, bodyPayloadFromUtf8, brand, buildCdpShadowBoundaryIndex, buildDomSnapshotFromCdpCapture, closedPageError, closedSessionError, createBodyPayload, createBrowserCoreError, createChooserRef, createDevicePixelRatio, createDialogRef, createDocumentEpoch, createDocumentRef, createDownloadRef, createFakeBrowserCoreEngine, createFrameRef, createHeaderEntry, createNetworkRequestId, createNodeLocator, createNodeRef, createPageRef, createPageScaleFactor, createPageZoomFactor, createPoint, createQuad, createRect, createScrollOffset, createSessionRef, createSize, createWorkerRef, filterCookieRecords, findDomSnapshotNode, findDomSnapshotNodeByRef, hasCapability, isBrowserCoreError, isChooserRef, isDialogRef, isDocumentRef, isDownloadRef, isFrameRef, isNetworkRequestId, isNodeRef, isPageRef, isSessionRef, isWorkerRef, matchesNetworkRecordFilters, mergeBrowserCapabilities, nextDocumentEpoch, noBrowserCapabilities, normalizeCdpShadowRootType, parseCdpStringTable, quadBounds, rareCdpIntegerValue, rareCdpStringValue, rectContainsPoint, rectToQuad, serializeDocumentEpoch, serializeRef, staleNodeRefError, unsupportedCapabilityError, waitForCdpVisualStability };
|
|
1221
|
+
export { type ActionBoundaryOutcome, type ActionBoundarySettleTrigger, type ActionBoundarySnapshot, type ActionBoundaryTimedOutPhase, type BodyPayload, type BodyPayloadEncoding, type Brand, type BrowserCapabilities, type BrowserCapabilityPath, type BrowserCoreEngine, BrowserCoreError, type BrowserCoreErrorCode, type BrowserCoreErrorOptions, type BrowserExecutor, type BrowserInitScriptInput, type BrowserInitScriptRegistration, type BrowserInspector, type BrowserInstrumentation, type BrowserRouteFetchResult, type BrowserRouteHandlerResult, type BrowserRouteRegistration, type BrowserRouteRegistrationInput, type BrowserRouteRequest, CROSS_DOCUMENT_DETECTION_WINDOW_MS, CROSS_DOCUMENT_INTERACTION_TIMEOUT_MS, type CapturedCdpDomSnapshot, type CdpDomSnapshotDocument, type CdpDomTreeNode, type CdpRareIntegerData, type CdpRareStringData, type CdpShadowBoundaryInfo, type ChooserOpenedStepEvent, type ChooserRef, type ConsoleLevel, type ConsoleStepEvent, type CookiePriority, type CookieRecord, type CookieSameSite, type CoordinateSpace, DEFAULT_ACTION_BOUNDARY_POLL_INTERVAL_MS, DEFAULT_POST_LOAD_TRACKER_QUIET_WINDOW_MS, DEFAULT_VISUAL_STABILITY_SETTLE_MS, DEFAULT_VISUAL_STABILITY_TIMEOUT_MS, DOM_SNAPSHOT_COMPUTED_STYLE_NAMES, type DevicePixelRatio, type DialogOpenedStepEvent, type DialogRef, type DocumentEpoch, type DocumentRef, type DomSnapshot, type DomSnapshotNode, type DownloadFinishedStepEvent, type DownloadRef, type DownloadStartedStepEvent, type EventStreamMessageStepEvent, FakeBrowserCoreEngine, type FakeBrowserCoreEngineOptions, type FakeBrowserCorePageSeed, type FrameInfo, type FrameRef, type FrozenStepEvent, type GetNetworkRecordsInput, type HeaderEntry, type HitTestResult, type HtmlSnapshot, type IndexedDbDatabaseSnapshot, type IndexedDbIndexSnapshot, type IndexedDbObjectStoreSnapshot, type IndexedDbRecord, type KeyModifier, type LayoutViewport, type MouseButton, type NetworkCaptureState, type NetworkInitiator, type NetworkInitiatorType, type NetworkRecord, type NetworkRecordFilterInput, type NetworkRecordKind, type NetworkRequestId, type NetworkResourceType, type NetworkSourceMetadata, type NetworkTiming, type NetworkTransferSizes, type NodeLocator, type NodeRef, type PageClosedStepEvent, type PageCreatedStepEvent, type PageErrorStepEvent, type PageInfo, type PageLifecycleState, type PageRef, type PageScaleFactor, type PageZoomFactor, type PartialBrowserCapabilities, type PausedStepEvent, type Point, type PopupOpenedStepEvent, type PostLoadTrackerSnapshot, type PostLoadTrackerState, type Quad, type Rect, type ResumedStepEvent, type ScreenshotArtifact, type ScreenshotFormat, type ScrollOffset, type SessionRef, type SessionStorageSnapshot, type SessionTransportExecutor, type SessionTransportRequest, type SessionTransportResponse, type ShadowDomSnapshotMode, type Size, type StepEvent, type StepResult, type StorageEntry, type StorageOriginSnapshot, type StorageSnapshot, type ViewportMetrics, type VisualStabilityScope, type VisualViewport, type WaitForActionBoundaryInput, type WebSocketClosedStepEvent, type WebSocketFrameStepEvent, type WebSocketOpenedStepEvent, type WorkerCreatedStepEvent, type WorkerDestroyedStepEvent, type WorkerRef, allBrowserCapabilities, bodyPayloadFromUtf8, brand, buildCdpShadowBoundaryIndex, buildDomSnapshotFromCdpCapture, buildPostLoadTrackerBeginExpression, buildPostLoadTrackerFreezeExpression, buildPostLoadTrackerInstallScript, buildPostLoadTrackerReadExpression, capturePostLoadTrackerSnapshot, closedPageError, closedSessionError, createBodyPayload, createBrowserCoreError, createChooserRef, createDevicePixelRatio, createDialogRef, createDocumentEpoch, createDocumentRef, createDownloadRef, createFakeBrowserCoreEngine, createFrameRef, createHeaderEntry, createNetworkRequestId, createNodeLocator, createNodeRef, createPageRef, createPageScaleFactor, createPageZoomFactor, createPoint, createQuad, createRect, createScrollOffset, createSessionRef, createSize, createWorkerRef, filterCookieRecords, findDomSnapshotNode, findDomSnapshotNodeByRef, hasCapability, isBrowserCoreError, isChooserRef, isDialogRef, isDocumentRef, isDownloadRef, isFrameRef, isNetworkRequestId, isNodeRef, isPageRef, isSessionRef, isWorkerRef, matchesNetworkRecordFilters, mergeBrowserCapabilities, nextDocumentEpoch, noBrowserCapabilities, normalizeCdpShadowRootType, normalizePostLoadTrackerState, parseCdpStringTable, postLoadTrackerHasTrackedNetworkActivitySince, postLoadTrackerIsSettled, quadBounds, rareCdpIntegerValue, rareCdpStringValue, rectContainsPoint, rectToQuad, serializeDocumentEpoch, serializeRef, staleNodeRefError, unsupportedCapabilityError, waitForActionBoundary, waitForCdpVisualStability };
|
package/dist/index.d.ts
CHANGED
|
@@ -468,6 +468,66 @@ declare function staleNodeRefError(input: {
|
|
|
468
468
|
declare function closedSessionError(sessionRef: SessionRef): BrowserCoreError;
|
|
469
469
|
declare function closedPageError(pageRef: PageRef): BrowserCoreError;
|
|
470
470
|
|
|
471
|
+
declare const DEFAULT_POST_LOAD_TRACKER_QUIET_WINDOW_MS = 400;
|
|
472
|
+
declare const DEFAULT_ACTION_BOUNDARY_POLL_INTERVAL_MS = 100;
|
|
473
|
+
interface PostLoadTrackerState {
|
|
474
|
+
readonly installedAt: number;
|
|
475
|
+
readonly lastMutationAt: number;
|
|
476
|
+
readonly lastNetworkActivityAt: number;
|
|
477
|
+
readonly lastTrackedNetworkActivityAt: number;
|
|
478
|
+
readonly now: number;
|
|
479
|
+
readonly pendingFetches: number;
|
|
480
|
+
readonly pendingTimeouts: number;
|
|
481
|
+
readonly pendingXhrs: number;
|
|
482
|
+
readonly trackedPendingFetches: number;
|
|
483
|
+
readonly trackedPendingXhrs: number;
|
|
484
|
+
readonly collecting: boolean;
|
|
485
|
+
readonly readyState: string;
|
|
486
|
+
}
|
|
487
|
+
interface PostLoadTrackerSnapshot {
|
|
488
|
+
readonly lastTrackedNetworkActivityAt: number;
|
|
489
|
+
readonly trackedPendingFetches: number;
|
|
490
|
+
readonly trackedPendingXhrs: number;
|
|
491
|
+
}
|
|
492
|
+
declare function normalizePostLoadTrackerState(value: unknown): PostLoadTrackerState | undefined;
|
|
493
|
+
declare function buildPostLoadTrackerInstallScript(): string;
|
|
494
|
+
declare function buildPostLoadTrackerBeginExpression(): string;
|
|
495
|
+
declare function buildPostLoadTrackerFreezeExpression(): string;
|
|
496
|
+
declare function buildPostLoadTrackerReadExpression(): string;
|
|
497
|
+
declare function capturePostLoadTrackerSnapshot(tracker: PostLoadTrackerState): PostLoadTrackerSnapshot;
|
|
498
|
+
declare function postLoadTrackerHasTrackedNetworkActivitySince(snapshot: PostLoadTrackerSnapshot, tracker: PostLoadTrackerState | undefined): boolean;
|
|
499
|
+
declare function postLoadTrackerIsSettled(tracker: PostLoadTrackerState | undefined, quietWindowMs?: number): boolean;
|
|
500
|
+
|
|
501
|
+
declare const CROSS_DOCUMENT_INTERACTION_TIMEOUT_MS = 30000;
|
|
502
|
+
declare const CROSS_DOCUMENT_DETECTION_WINDOW_MS = 500;
|
|
503
|
+
interface ActionBoundarySnapshot {
|
|
504
|
+
readonly pageRef: PageRef;
|
|
505
|
+
readonly documentRef: DocumentRef;
|
|
506
|
+
readonly url?: string;
|
|
507
|
+
readonly tracker?: PostLoadTrackerSnapshot;
|
|
508
|
+
}
|
|
509
|
+
type ActionBoundarySettleTrigger = "dom-action" | "navigation";
|
|
510
|
+
type ActionBoundaryTimedOutPhase = "bootstrap";
|
|
511
|
+
interface ActionBoundaryOutcome {
|
|
512
|
+
readonly trigger: ActionBoundarySettleTrigger;
|
|
513
|
+
readonly crossDocument: boolean;
|
|
514
|
+
readonly bootstrapSettled: boolean;
|
|
515
|
+
readonly timedOutPhase?: ActionBoundaryTimedOutPhase;
|
|
516
|
+
}
|
|
517
|
+
interface WaitForActionBoundaryInput {
|
|
518
|
+
readonly timeoutMs: number;
|
|
519
|
+
readonly signal?: AbortSignal;
|
|
520
|
+
readonly snapshot?: ActionBoundarySnapshot;
|
|
521
|
+
readonly pollIntervalMs?: number;
|
|
522
|
+
getCurrentMainFrameDocumentRef(): DocumentRef | undefined;
|
|
523
|
+
getCurrentPageUrl?(): string | undefined;
|
|
524
|
+
isCurrentMainFrameBootstrapSettled?(): boolean;
|
|
525
|
+
readTrackerState(): Promise<PostLoadTrackerState | undefined>;
|
|
526
|
+
throwBackgroundError(): void;
|
|
527
|
+
isPageClosed(): boolean;
|
|
528
|
+
}
|
|
529
|
+
declare function waitForActionBoundary(input: WaitForActionBoundaryInput): Promise<ActionBoundaryOutcome>;
|
|
530
|
+
|
|
471
531
|
type ConsoleLevel = "debug" | "log" | "info" | "warn" | "error" | "trace";
|
|
472
532
|
interface StepEventBase {
|
|
473
533
|
readonly eventId: string;
|
|
@@ -765,6 +825,9 @@ interface BrowserExecutor {
|
|
|
765
825
|
}
|
|
766
826
|
interface BrowserInspector {
|
|
767
827
|
readonly capabilities: Readonly<BrowserCapabilities>;
|
|
828
|
+
drainEvents(input: {
|
|
829
|
+
readonly pageRef: PageRef;
|
|
830
|
+
}): Promise<readonly StepEvent[]>;
|
|
768
831
|
listPages(input: {
|
|
769
832
|
readonly sessionRef: SessionRef;
|
|
770
833
|
}): Promise<readonly PageInfo[]>;
|
|
@@ -785,12 +848,22 @@ interface BrowserInspector {
|
|
|
785
848
|
readonly frameRef?: FrameRef;
|
|
786
849
|
readonly documentRef?: DocumentRef;
|
|
787
850
|
}): Promise<DomSnapshot>;
|
|
851
|
+
getActionBoundarySnapshot(input: {
|
|
852
|
+
readonly pageRef: PageRef;
|
|
853
|
+
}): Promise<ActionBoundarySnapshot>;
|
|
788
854
|
waitForVisualStability(input: {
|
|
789
855
|
readonly pageRef: PageRef;
|
|
790
856
|
readonly timeoutMs?: number;
|
|
791
857
|
readonly settleMs?: number;
|
|
792
858
|
readonly scope?: VisualStabilityScope;
|
|
793
859
|
}): Promise<void>;
|
|
860
|
+
waitForPostLoadQuiet(input: {
|
|
861
|
+
readonly pageRef: PageRef;
|
|
862
|
+
readonly timeoutMs?: number;
|
|
863
|
+
readonly quietMs?: number;
|
|
864
|
+
readonly captureWindowMs?: number;
|
|
865
|
+
readonly signal?: AbortSignal;
|
|
866
|
+
}): Promise<void>;
|
|
794
867
|
readText(input: NodeLocator): Promise<string | null>;
|
|
795
868
|
readAttributes(input: NodeLocator): Promise<readonly {
|
|
796
869
|
readonly name: string;
|
|
@@ -963,6 +1036,9 @@ declare class FakeBrowserCoreEngine implements BrowserCoreEngine {
|
|
|
963
1036
|
listPages(input: {
|
|
964
1037
|
readonly sessionRef: SessionRef;
|
|
965
1038
|
}): Promise<readonly PageInfo[]>;
|
|
1039
|
+
drainEvents(input: {
|
|
1040
|
+
readonly pageRef: PageRef;
|
|
1041
|
+
}): Promise<readonly StepEvent[]>;
|
|
966
1042
|
listFrames(input: {
|
|
967
1043
|
readonly pageRef: PageRef;
|
|
968
1044
|
}): Promise<readonly FrameInfo[]>;
|
|
@@ -980,12 +1056,22 @@ declare class FakeBrowserCoreEngine implements BrowserCoreEngine {
|
|
|
980
1056
|
readonly frameRef?: FrameRef;
|
|
981
1057
|
readonly documentRef?: DocumentRef;
|
|
982
1058
|
}): Promise<DomSnapshot>;
|
|
1059
|
+
getActionBoundarySnapshot(input: {
|
|
1060
|
+
readonly pageRef: PageRef;
|
|
1061
|
+
}): Promise<ActionBoundarySnapshot>;
|
|
983
1062
|
waitForVisualStability(_input: {
|
|
984
1063
|
readonly pageRef: PageRef;
|
|
985
1064
|
readonly timeoutMs?: number;
|
|
986
1065
|
readonly settleMs?: number;
|
|
987
1066
|
readonly scope?: "main-frame" | "visible-frames";
|
|
988
1067
|
}): Promise<void>;
|
|
1068
|
+
waitForPostLoadQuiet(_input: {
|
|
1069
|
+
readonly pageRef: PageRef;
|
|
1070
|
+
readonly timeoutMs?: number;
|
|
1071
|
+
readonly quietMs?: number;
|
|
1072
|
+
readonly captureWindowMs?: number;
|
|
1073
|
+
readonly signal?: AbortSignal;
|
|
1074
|
+
}): Promise<void>;
|
|
989
1075
|
readText(input: NodeLocator): Promise<string | null>;
|
|
990
1076
|
readAttributes(input: NodeLocator): Promise<readonly {
|
|
991
1077
|
readonly name: string;
|
|
@@ -1132,4 +1218,4 @@ interface VisualStabilityOptions {
|
|
|
1132
1218
|
}
|
|
1133
1219
|
declare function waitForCdpVisualStability(cdp: CdpSessionLike, options?: VisualStabilityOptions): Promise<void>;
|
|
1134
1220
|
|
|
1135
|
-
export { type BodyPayload, type BodyPayloadEncoding, type Brand, type BrowserCapabilities, type BrowserCapabilityPath, type BrowserCoreEngine, BrowserCoreError, type BrowserCoreErrorCode, type BrowserCoreErrorOptions, type BrowserExecutor, type BrowserInitScriptInput, type BrowserInitScriptRegistration, type BrowserInspector, type BrowserInstrumentation, type BrowserRouteFetchResult, type BrowserRouteHandlerResult, type BrowserRouteRegistration, type BrowserRouteRegistrationInput, type BrowserRouteRequest, type CapturedCdpDomSnapshot, type CdpDomSnapshotDocument, type CdpDomTreeNode, type CdpRareIntegerData, type CdpRareStringData, type CdpShadowBoundaryInfo, type ChooserOpenedStepEvent, type ChooserRef, type ConsoleLevel, type ConsoleStepEvent, type CookiePriority, type CookieRecord, type CookieSameSite, type CoordinateSpace, DEFAULT_VISUAL_STABILITY_SETTLE_MS, DEFAULT_VISUAL_STABILITY_TIMEOUT_MS, DOM_SNAPSHOT_COMPUTED_STYLE_NAMES, type DevicePixelRatio, type DialogOpenedStepEvent, type DialogRef, type DocumentEpoch, type DocumentRef, type DomSnapshot, type DomSnapshotNode, type DownloadFinishedStepEvent, type DownloadRef, type DownloadStartedStepEvent, type EventStreamMessageStepEvent, FakeBrowserCoreEngine, type FakeBrowserCoreEngineOptions, type FakeBrowserCorePageSeed, type FrameInfo, type FrameRef, type FrozenStepEvent, type GetNetworkRecordsInput, type HeaderEntry, type HitTestResult, type HtmlSnapshot, type IndexedDbDatabaseSnapshot, type IndexedDbIndexSnapshot, type IndexedDbObjectStoreSnapshot, type IndexedDbRecord, type KeyModifier, type LayoutViewport, type MouseButton, type NetworkCaptureState, type NetworkInitiator, type NetworkInitiatorType, type NetworkRecord, type NetworkRecordFilterInput, type NetworkRecordKind, type NetworkRequestId, type NetworkResourceType, type NetworkSourceMetadata, type NetworkTiming, type NetworkTransferSizes, type NodeLocator, type NodeRef, type PageClosedStepEvent, type PageCreatedStepEvent, type PageErrorStepEvent, type PageInfo, type PageLifecycleState, type PageRef, type PageScaleFactor, type PageZoomFactor, type PartialBrowserCapabilities, type PausedStepEvent, type Point, type PopupOpenedStepEvent, type Quad, type Rect, type ResumedStepEvent, type ScreenshotArtifact, type ScreenshotFormat, type ScrollOffset, type SessionRef, type SessionStorageSnapshot, type SessionTransportExecutor, type SessionTransportRequest, type SessionTransportResponse, type ShadowDomSnapshotMode, type Size, type StepEvent, type StepResult, type StorageEntry, type StorageOriginSnapshot, type StorageSnapshot, type ViewportMetrics, type VisualStabilityScope, type VisualViewport, type WebSocketClosedStepEvent, type WebSocketFrameStepEvent, type WebSocketOpenedStepEvent, type WorkerCreatedStepEvent, type WorkerDestroyedStepEvent, type WorkerRef, allBrowserCapabilities, bodyPayloadFromUtf8, brand, buildCdpShadowBoundaryIndex, buildDomSnapshotFromCdpCapture, closedPageError, closedSessionError, createBodyPayload, createBrowserCoreError, createChooserRef, createDevicePixelRatio, createDialogRef, createDocumentEpoch, createDocumentRef, createDownloadRef, createFakeBrowserCoreEngine, createFrameRef, createHeaderEntry, createNetworkRequestId, createNodeLocator, createNodeRef, createPageRef, createPageScaleFactor, createPageZoomFactor, createPoint, createQuad, createRect, createScrollOffset, createSessionRef, createSize, createWorkerRef, filterCookieRecords, findDomSnapshotNode, findDomSnapshotNodeByRef, hasCapability, isBrowserCoreError, isChooserRef, isDialogRef, isDocumentRef, isDownloadRef, isFrameRef, isNetworkRequestId, isNodeRef, isPageRef, isSessionRef, isWorkerRef, matchesNetworkRecordFilters, mergeBrowserCapabilities, nextDocumentEpoch, noBrowserCapabilities, normalizeCdpShadowRootType, parseCdpStringTable, quadBounds, rareCdpIntegerValue, rareCdpStringValue, rectContainsPoint, rectToQuad, serializeDocumentEpoch, serializeRef, staleNodeRefError, unsupportedCapabilityError, waitForCdpVisualStability };
|
|
1221
|
+
export { type ActionBoundaryOutcome, type ActionBoundarySettleTrigger, type ActionBoundarySnapshot, type ActionBoundaryTimedOutPhase, type BodyPayload, type BodyPayloadEncoding, type Brand, type BrowserCapabilities, type BrowserCapabilityPath, type BrowserCoreEngine, BrowserCoreError, type BrowserCoreErrorCode, type BrowserCoreErrorOptions, type BrowserExecutor, type BrowserInitScriptInput, type BrowserInitScriptRegistration, type BrowserInspector, type BrowserInstrumentation, type BrowserRouteFetchResult, type BrowserRouteHandlerResult, type BrowserRouteRegistration, type BrowserRouteRegistrationInput, type BrowserRouteRequest, CROSS_DOCUMENT_DETECTION_WINDOW_MS, CROSS_DOCUMENT_INTERACTION_TIMEOUT_MS, type CapturedCdpDomSnapshot, type CdpDomSnapshotDocument, type CdpDomTreeNode, type CdpRareIntegerData, type CdpRareStringData, type CdpShadowBoundaryInfo, type ChooserOpenedStepEvent, type ChooserRef, type ConsoleLevel, type ConsoleStepEvent, type CookiePriority, type CookieRecord, type CookieSameSite, type CoordinateSpace, DEFAULT_ACTION_BOUNDARY_POLL_INTERVAL_MS, DEFAULT_POST_LOAD_TRACKER_QUIET_WINDOW_MS, DEFAULT_VISUAL_STABILITY_SETTLE_MS, DEFAULT_VISUAL_STABILITY_TIMEOUT_MS, DOM_SNAPSHOT_COMPUTED_STYLE_NAMES, type DevicePixelRatio, type DialogOpenedStepEvent, type DialogRef, type DocumentEpoch, type DocumentRef, type DomSnapshot, type DomSnapshotNode, type DownloadFinishedStepEvent, type DownloadRef, type DownloadStartedStepEvent, type EventStreamMessageStepEvent, FakeBrowserCoreEngine, type FakeBrowserCoreEngineOptions, type FakeBrowserCorePageSeed, type FrameInfo, type FrameRef, type FrozenStepEvent, type GetNetworkRecordsInput, type HeaderEntry, type HitTestResult, type HtmlSnapshot, type IndexedDbDatabaseSnapshot, type IndexedDbIndexSnapshot, type IndexedDbObjectStoreSnapshot, type IndexedDbRecord, type KeyModifier, type LayoutViewport, type MouseButton, type NetworkCaptureState, type NetworkInitiator, type NetworkInitiatorType, type NetworkRecord, type NetworkRecordFilterInput, type NetworkRecordKind, type NetworkRequestId, type NetworkResourceType, type NetworkSourceMetadata, type NetworkTiming, type NetworkTransferSizes, type NodeLocator, type NodeRef, type PageClosedStepEvent, type PageCreatedStepEvent, type PageErrorStepEvent, type PageInfo, type PageLifecycleState, type PageRef, type PageScaleFactor, type PageZoomFactor, type PartialBrowserCapabilities, type PausedStepEvent, type Point, type PopupOpenedStepEvent, type PostLoadTrackerSnapshot, type PostLoadTrackerState, type Quad, type Rect, type ResumedStepEvent, type ScreenshotArtifact, type ScreenshotFormat, type ScrollOffset, type SessionRef, type SessionStorageSnapshot, type SessionTransportExecutor, type SessionTransportRequest, type SessionTransportResponse, type ShadowDomSnapshotMode, type Size, type StepEvent, type StepResult, type StorageEntry, type StorageOriginSnapshot, type StorageSnapshot, type ViewportMetrics, type VisualStabilityScope, type VisualViewport, type WaitForActionBoundaryInput, type WebSocketClosedStepEvent, type WebSocketFrameStepEvent, type WebSocketOpenedStepEvent, type WorkerCreatedStepEvent, type WorkerDestroyedStepEvent, type WorkerRef, allBrowserCapabilities, bodyPayloadFromUtf8, brand, buildCdpShadowBoundaryIndex, buildDomSnapshotFromCdpCapture, buildPostLoadTrackerBeginExpression, buildPostLoadTrackerFreezeExpression, buildPostLoadTrackerInstallScript, buildPostLoadTrackerReadExpression, capturePostLoadTrackerSnapshot, closedPageError, closedSessionError, createBodyPayload, createBrowserCoreError, createChooserRef, createDevicePixelRatio, createDialogRef, createDocumentEpoch, createDocumentRef, createDownloadRef, createFakeBrowserCoreEngine, createFrameRef, createHeaderEntry, createNetworkRequestId, createNodeLocator, createNodeRef, createPageRef, createPageScaleFactor, createPageZoomFactor, createPoint, createQuad, createRect, createScrollOffset, createSessionRef, createSize, createWorkerRef, filterCookieRecords, findDomSnapshotNode, findDomSnapshotNodeByRef, hasCapability, isBrowserCoreError, isChooserRef, isDialogRef, isDocumentRef, isDownloadRef, isFrameRef, isNetworkRequestId, isNodeRef, isPageRef, isSessionRef, isWorkerRef, matchesNetworkRecordFilters, mergeBrowserCapabilities, nextDocumentEpoch, noBrowserCapabilities, normalizeCdpShadowRootType, normalizePostLoadTrackerState, parseCdpStringTable, postLoadTrackerHasTrackedNetworkActivitySince, postLoadTrackerIsSettled, quadBounds, rareCdpIntegerValue, rareCdpStringValue, rectContainsPoint, rectToQuad, serializeDocumentEpoch, serializeRef, staleNodeRefError, unsupportedCapabilityError, waitForActionBoundary, waitForCdpVisualStability };
|