playwright-core 1.57.0-alpha-2025-10-30 → 1.57.0-alpha-1761929702000

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.
@@ -110,9 +110,10 @@ export module Protocol {
110
110
  - from 'live' to 'root': attributes which apply to nodes in live regions
111
111
  - from 'autocomplete' to 'valuetext': attributes which apply to widgets
112
112
  - from 'checked' to 'selected': states which apply to widgets
113
- - from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.
113
+ - from 'activedescendant' to 'owns': relationships between elements other than parent/child/sibling
114
+ - from 'activeFullscreenElement' to 'uninteresting': reasons why this noode is hidden
114
115
  */
115
- export type AXPropertyName = "actions"|"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"|"url";
116
+ export type AXPropertyName = "actions"|"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"|"url"|"activeFullscreenElement"|"activeModalDialog"|"activeAriaModalDialog"|"ariaHiddenElement"|"ariaHiddenSubtree"|"emptyAlt"|"emptyText"|"inertElement"|"inertSubtree"|"labelContainer"|"labelFor"|"notRendered"|"notVisible"|"presentationalRole"|"probablyPresentational"|"inactiveCarouselTabContent"|"uninteresting";
116
117
  /**
117
118
  * A node in the accessibility tree.
118
119
  */
@@ -859,7 +860,7 @@ CORS RFC1918 enforcement.
859
860
  clientSecurityState?: Network.ClientSecurityState;
860
861
  }
861
862
  export type AttributionReportingIssueType = "PermissionPolicyDisabled"|"UntrustworthyReportingOrigin"|"InsecureContext"|"InvalidHeader"|"InvalidRegisterTriggerHeader"|"SourceAndTriggerHeaders"|"SourceIgnored"|"TriggerIgnored"|"OsSourceIgnored"|"OsTriggerIgnored"|"InvalidRegisterOsSourceHeader"|"InvalidRegisterOsTriggerHeader"|"WebAndOsHeaders"|"NoWebOrOsSupport"|"NavigationRegistrationWithoutTransientUserActivation"|"InvalidInfoHeader"|"NoRegisterSourceHeader"|"NoRegisterTriggerHeader"|"NoRegisterOsSourceHeader"|"NoRegisterOsTriggerHeader"|"NavigationRegistrationUniqueScopeAlreadySet";
862
- export type SharedDictionaryError = "UseErrorCrossOriginNoCorsRequest"|"UseErrorDictionaryLoadFailure"|"UseErrorMatchingDictionaryNotUsed"|"UseErrorUnexpectedContentDictionaryHeader"|"WriteErrorCossOriginNoCorsRequest"|"WriteErrorDisallowedBySettings"|"WriteErrorExpiredResponse"|"WriteErrorFeatureDisabled"|"WriteErrorInsufficientResources"|"WriteErrorInvalidMatchField"|"WriteErrorInvalidStructuredHeader"|"WriteErrorNavigationRequest"|"WriteErrorNoMatchField"|"WriteErrorNonListMatchDestField"|"WriteErrorNonSecureContext"|"WriteErrorNonStringIdField"|"WriteErrorNonStringInMatchDestList"|"WriteErrorNonStringMatchField"|"WriteErrorNonTokenTypeField"|"WriteErrorRequestAborted"|"WriteErrorShuttingDown"|"WriteErrorTooLongIdField"|"WriteErrorUnsupportedType";
863
+ export type SharedDictionaryError = "UseErrorCrossOriginNoCorsRequest"|"UseErrorDictionaryLoadFailure"|"UseErrorMatchingDictionaryNotUsed"|"UseErrorUnexpectedContentDictionaryHeader"|"WriteErrorCossOriginNoCorsRequest"|"WriteErrorDisallowedBySettings"|"WriteErrorExpiredResponse"|"WriteErrorFeatureDisabled"|"WriteErrorInsufficientResources"|"WriteErrorInvalidMatchField"|"WriteErrorInvalidStructuredHeader"|"WriteErrorInvalidTTLField"|"WriteErrorNavigationRequest"|"WriteErrorNoMatchField"|"WriteErrorNonIntegerTTLField"|"WriteErrorNonListMatchDestField"|"WriteErrorNonSecureContext"|"WriteErrorNonStringIdField"|"WriteErrorNonStringInMatchDestList"|"WriteErrorNonStringMatchField"|"WriteErrorNonTokenTypeField"|"WriteErrorRequestAborted"|"WriteErrorShuttingDown"|"WriteErrorTooLongIdField"|"WriteErrorUnsupportedType";
863
864
  export type SRIMessageSignatureError = "MissingSignatureHeader"|"MissingSignatureInputHeader"|"InvalidSignatureHeader"|"InvalidSignatureInputHeader"|"SignatureHeaderValueIsNotByteSequence"|"SignatureHeaderValueIsParameterized"|"SignatureHeaderValueIsIncorrectLength"|"SignatureInputHeaderMissingLabel"|"SignatureInputHeaderValueNotInnerList"|"SignatureInputHeaderValueMissingComponents"|"SignatureInputHeaderInvalidComponentType"|"SignatureInputHeaderInvalidComponentName"|"SignatureInputHeaderInvalidHeaderComponentParameter"|"SignatureInputHeaderInvalidDerivedComponentParameter"|"SignatureInputHeaderKeyIdLength"|"SignatureInputHeaderInvalidParameter"|"SignatureInputHeaderMissingRequiredParameters"|"ValidationFailedSignatureExpired"|"ValidationFailedInvalidLength"|"ValidationFailedSignatureMismatch"|"ValidationFailedIntegrityMismatch";
864
865
  export type UnencodedDigestError = "MalformedDictionary"|"UnknownAlgorithm"|"IncorrectDigestType"|"IncorrectDigestLength";
865
866
  /**
@@ -1230,6 +1231,8 @@ using Audits.issueAdded event.
1230
1231
  export interface AddressField {
1231
1232
  /**
1232
1233
  * address field name, for example GIVEN_NAME.
1234
+ The full list of supported field names:
1235
+ https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/field_types.cc;l=38
1233
1236
  */
1234
1237
  name: string;
1235
1238
  /**
@@ -1332,9 +1335,13 @@ If the field and related form cannot be autofilled, returns an error.
1332
1335
  */
1333
1336
  frameId?: Page.FrameId;
1334
1337
  /**
1335
- * Credit card information to fill out the form. Credit card data is not saved.
1338
+ * Credit card information to fill out the form. Credit card data is not saved. Mutually exclusive with `address`.
1336
1339
  */
1337
- card: CreditCard;
1340
+ card?: CreditCard;
1341
+ /**
1342
+ * Address to fill out the form. Address data is not saved. Mutually exclusive with `card`.
1343
+ */
1344
+ address?: Address;
1338
1345
  }
1339
1346
  export type triggerReturnValue = {
1340
1347
  }
@@ -2483,6 +2490,10 @@ stylesheet rules) this rule came from.
2483
2490
  * Associated style declaration.
2484
2491
  */
2485
2492
  style: CSSStyle;
2493
+ /**
2494
+ * The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.
2495
+ */
2496
+ originTreeScopeNodeId?: DOM.BackendNodeId;
2486
2497
  /**
2487
2498
  * Media list array (for rules involving media queries). The array enumerates media queries
2488
2499
  starting with the innermost one, going outwards.
@@ -4276,6 +4287,7 @@ The property is always undefined now.
4276
4287
  compatibilityMode?: CompatibilityMode;
4277
4288
  assignedSlot?: BackendNode;
4278
4289
  isScrollable?: boolean;
4290
+ affectedByStartingStyles?: boolean;
4279
4291
  }
4280
4292
  /**
4281
4293
  * A structure to hold the top-level node of a detached tree and an array of its retained descendants.
@@ -4533,6 +4545,19 @@ The property is always undefined now.
4533
4545
  */
4534
4546
  isScrollable: boolean;
4535
4547
  }
4548
+ /**
4549
+ * Fired when a node's starting styles changes.
4550
+ */
4551
+ export type affectedByStartingStylesFlagUpdatedPayload = {
4552
+ /**
4553
+ * The id of the node.
4554
+ */
4555
+ nodeId: DOM.NodeId;
4556
+ /**
4557
+ * If the node has starting styles.
4558
+ */
4559
+ affectedByStartingStyles: boolean;
4560
+ }
4536
4561
  /**
4537
4562
  * Called when a pseudo element is removed from an element.
4538
4563
  */
@@ -8441,9 +8466,9 @@ Security origin.
8441
8466
  */
8442
8467
  objectStoreName: string;
8443
8468
  /**
8444
- * Index name, empty string for object store data requests.
8469
+ * Index name. If not specified, it performs an object store data request.
8445
8470
  */
8446
- indexName: string;
8471
+ indexName?: string;
8447
8472
  /**
8448
8473
  * Number of records to skip.
8449
8474
  */
@@ -10056,6 +10081,10 @@ passed by the developer (e.g. via "fetch") as understood by the backend.
10056
10081
  request corresponding to the main frame.
10057
10082
  */
10058
10083
  isSameSite?: boolean;
10084
+ /**
10085
+ * True when the resource request is ad-related.
10086
+ */
10087
+ isAdRelated?: boolean;
10059
10088
  }
10060
10089
  /**
10061
10090
  * Details of a signed certificate timestamp (SCT).
@@ -10498,6 +10527,9 @@ of the request to the endpoint that set the cookie.
10498
10527
  path: string;
10499
10528
  /**
10500
10529
  * Cookie expiration date as the number of seconds since the UNIX epoch.
10530
+ The value is set to -1 if the expiry date is not set.
10531
+ The value can be null for values that cannot be represented in
10532
+ JSON (±Inf).
10501
10533
  */
10502
10534
  expires: number;
10503
10535
  /**
@@ -10864,6 +10896,42 @@ extra headers.
10864
10896
  * List of content encodings supported by the backend.
10865
10897
  */
10866
10898
  export type ContentEncoding = "deflate"|"gzip"|"br"|"zstd";
10899
+ export interface NetworkConditions {
10900
+ /**
10901
+ * Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string
10902
+ syntax (https://urlpattern.spec.whatwg.org/). If the pattern is empty, all requests are matched (including p2p
10903
+ connections).
10904
+ */
10905
+ urlPattern: string;
10906
+ /**
10907
+ * Minimum latency from request sent to response headers received (ms).
10908
+ */
10909
+ latency: number;
10910
+ /**
10911
+ * Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
10912
+ */
10913
+ downloadThroughput: number;
10914
+ /**
10915
+ * Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
10916
+ */
10917
+ uploadThroughput: number;
10918
+ /**
10919
+ * Connection type if known.
10920
+ */
10921
+ connectionType?: ConnectionType;
10922
+ /**
10923
+ * WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
10924
+ */
10925
+ packetLoss?: number;
10926
+ /**
10927
+ * WebRTC packet queue length (packet). 0 removes any queue length limitations.
10928
+ */
10929
+ packetQueueLength?: number;
10930
+ /**
10931
+ * WebRTC packetReordering feature.
10932
+ */
10933
+ packetReordering?: boolean;
10934
+ }
10867
10935
  export type DirectSocketDnsQueryType = "ipv4"|"ipv6";
10868
10936
  export interface DirectTCPSocketOptions {
10869
10937
  /**
@@ -11638,6 +11706,11 @@ the request and the ones not sent; the latter are distinguished by having blocke
11638
11706
  * Whether the site has partitioned cookies stored in a partition different than the current one.
11639
11707
  */
11640
11708
  siteHasCookieInOtherPartition?: boolean;
11709
+ /**
11710
+ * The network conditions id if this request was affected by network conditions configured via
11711
+ emulateNetworkConditionsByRule.
11712
+ */
11713
+ appliedNetworkConditionsId?: string;
11641
11714
  }
11642
11715
  /**
11643
11716
  * Fired when additional information about a responseReceived event is available from the network
@@ -11844,6 +11917,17 @@ or reason it is not active.
11844
11917
  */
11845
11918
  status: IpProxyStatus;
11846
11919
  }
11920
+ /**
11921
+ * Sets bypass IP Protection Proxy boolean.
11922
+ */
11923
+ export type setIPProtectionProxyBypassEnabledParameters = {
11924
+ /**
11925
+ * Whether IP Proxy is being bypassed by devtools; false by default.
11926
+ */
11927
+ enabled: boolean;
11928
+ }
11929
+ export type setIPProtectionProxyBypassEnabledReturnValue = {
11930
+ }
11847
11931
  /**
11848
11932
  * Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
11849
11933
  */
@@ -11992,7 +12076,8 @@ all partition key attributes match the cookie partition key attribute.
11992
12076
  export type disableReturnValue = {
11993
12077
  }
11994
12078
  /**
11995
- * Activates emulation of network conditions.
12079
+ * Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule
12080
+ and overrideNetworkState commands, which can be used together to the same effect.
11996
12081
  */
11997
12082
  export type emulateNetworkConditionsParameters = {
11998
12083
  /**
@@ -12030,6 +12115,55 @@ all partition key attributes match the cookie partition key attribute.
12030
12115
  }
12031
12116
  export type emulateNetworkConditionsReturnValue = {
12032
12117
  }
12118
+ /**
12119
+ * Activates emulation of network conditions for individual requests using URL match patterns.
12120
+ */
12121
+ export type emulateNetworkConditionsByRuleParameters = {
12122
+ /**
12123
+ * True to emulate internet disconnection.
12124
+ */
12125
+ offline: boolean;
12126
+ /**
12127
+ * Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global
12128
+ conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are
12129
+ also applied for throttling of p2p connections.
12130
+ */
12131
+ matchedNetworkConditions: NetworkConditions[];
12132
+ }
12133
+ export type emulateNetworkConditionsByRuleReturnValue = {
12134
+ /**
12135
+ * An id for each entry in matchedNetworkConditions. The id will be included in the requestWillBeSentExtraInfo for
12136
+ requests affected by a rule.
12137
+ */
12138
+ ruleIds: string[];
12139
+ }
12140
+ /**
12141
+ * Override the state of navigator.onLine and navigator.connection.
12142
+ */
12143
+ export type overrideNetworkStateParameters = {
12144
+ /**
12145
+ * True to emulate internet disconnection.
12146
+ */
12147
+ offline: boolean;
12148
+ /**
12149
+ * Minimum latency from request sent to response headers received (ms).
12150
+ */
12151
+ latency: number;
12152
+ /**
12153
+ * Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
12154
+ */
12155
+ downloadThroughput: number;
12156
+ /**
12157
+ * Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
12158
+ */
12159
+ uploadThroughput: number;
12160
+ /**
12161
+ * Connection type if known.
12162
+ */
12163
+ connectionType?: ConnectionType;
12164
+ }
12165
+ export type overrideNetworkStateReturnValue = {
12166
+ }
12033
12167
  /**
12034
12168
  * Enables network tracking, network events will now be delivered to the client.
12035
12169
  */
@@ -13351,7 +13485,8 @@ reinstallation.
13351
13485
 
13352
13486
  To generate bundle id for proxy mode:
13353
13487
  1. Generate 32 random bytes.
13354
- 2. Add a specific suffix 0x00 at the end.
13488
+ 2. Add a specific suffix at the end following the documentation
13489
+ https://github.com/WICG/isolated-web-apps/blob/main/Scheme.md#suffix
13355
13490
  3. Encode the entire sequence using Base32 without padding.
13356
13491
 
13357
13492
  If Chrome is not in IWA dev
@@ -13527,7 +13662,7 @@ available.
13527
13662
  in services/network/public/cpp/permissions_policy/permissions_policy_features.json5.
13528
13663
  LINT.IfChange(PermissionsPolicyFeature)
13529
13664
  */
13530
- export type PermissionsPolicyFeature = "accelerometer"|"all-screens-capture"|"ambient-light-sensor"|"aria-notify"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-high-entropy-values"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"controlled-frame"|"cross-origin-isolated"|"deferred-fetch"|"deferred-fetch-minimal"|"device-attributes"|"digital-credentials-create"|"digital-credentials-get"|"direct-sockets"|"direct-sockets-private"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"fenced-unpartitioned-storage-read"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"language-detector"|"language-model"|"local-fonts"|"local-network-access"|"magnetometer"|"media-playback-while-not-visible"|"microphone"|"midi"|"on-device-speech-recognition"|"otp-credentials"|"payment"|"picture-in-picture"|"popins"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"record-ad-auction-events"|"rewriter"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"summarizer"|"sync-xhr"|"translator"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-app-installation"|"web-printing"|"web-share"|"window-management"|"writer"|"xr-spatial-tracking";
13665
+ export type PermissionsPolicyFeature = "accelerometer"|"all-screens-capture"|"ambient-light-sensor"|"aria-notify"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-high-entropy-values"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"controlled-frame"|"cross-origin-isolated"|"deferred-fetch"|"deferred-fetch-minimal"|"device-attributes"|"digital-credentials-create"|"digital-credentials-get"|"direct-sockets"|"direct-sockets-multicast"|"direct-sockets-private"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"fenced-unpartitioned-storage-read"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"language-detector"|"language-model"|"local-fonts"|"local-network-access"|"magnetometer"|"media-playback-while-not-visible"|"microphone"|"midi"|"on-device-speech-recognition"|"otp-credentials"|"payment"|"picture-in-picture"|"popins"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"record-ad-auction-events"|"rewriter"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"summarizer"|"sync-xhr"|"translator"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-app-installation"|"web-printing"|"web-share"|"window-management"|"writer"|"xr-spatial-tracking";
13531
13666
  /**
13532
13667
  * Reason for a permissions policy feature to be disabled.
13533
13668
  */
@@ -14126,7 +14261,7 @@ https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-expl
14126
14261
  /**
14127
14262
  * List of not restored reasons for back-forward cache.
14128
14263
  */
14129
- export type BackForwardCacheNotRestoredReason = "NotPrimaryMainFrame"|"BackForwardCacheDisabled"|"RelatedActiveContentsExist"|"HTTPStatusNotOK"|"SchemeNotHTTPOrHTTPS"|"Loading"|"WasGrantedMediaAccess"|"DisableForRenderFrameHostCalled"|"DomainNotAllowed"|"HTTPMethodNotGET"|"SubframeIsNavigating"|"Timeout"|"CacheLimit"|"JavaScriptExecution"|"RendererProcessKilled"|"RendererProcessCrashed"|"SchedulerTrackedFeatureUsed"|"ConflictingBrowsingInstance"|"CacheFlushed"|"ServiceWorkerVersionActivation"|"SessionRestored"|"ServiceWorkerPostMessage"|"EnteredBackForwardCacheBeforeServiceWorkerHostAdded"|"RenderFrameHostReused_SameSite"|"RenderFrameHostReused_CrossSite"|"ServiceWorkerClaim"|"IgnoreEventAndEvict"|"HaveInnerContents"|"TimeoutPuttingInCache"|"BackForwardCacheDisabledByLowMemory"|"BackForwardCacheDisabledByCommandLine"|"NetworkRequestDatapipeDrainedAsBytesConsumer"|"NetworkRequestRedirected"|"NetworkRequestTimeout"|"NetworkExceedsBufferLimit"|"NavigationCancelledWhileRestoring"|"NotMostRecentNavigationEntry"|"BackForwardCacheDisabledForPrerender"|"UserAgentOverrideDiffers"|"ForegroundCacheLimit"|"BrowsingInstanceNotSwapped"|"BackForwardCacheDisabledForDelegate"|"UnloadHandlerExistsInMainFrame"|"UnloadHandlerExistsInSubFrame"|"ServiceWorkerUnregistration"|"CacheControlNoStore"|"CacheControlNoStoreCookieModified"|"CacheControlNoStoreHTTPOnlyCookieModified"|"NoResponseHead"|"Unknown"|"ActivationNavigationsDisallowedForBug1234857"|"ErrorDocument"|"FencedFramesEmbedder"|"CookieDisabled"|"HTTPAuthRequired"|"CookieFlushed"|"BroadcastChannelOnMessage"|"WebViewSettingsChanged"|"WebViewJavaScriptObjectChanged"|"WebViewMessageListenerInjected"|"WebViewSafeBrowsingAllowlistChanged"|"WebViewDocumentStartJavascriptChanged"|"WebSocket"|"WebTransport"|"WebRTC"|"MainResourceHasCacheControlNoStore"|"MainResourceHasCacheControlNoCache"|"SubresourceHasCacheControlNoStore"|"SubresourceHasCacheControlNoCache"|"ContainsPlugins"|"DocumentLoaded"|"OutstandingNetworkRequestOthers"|"RequestedMIDIPermission"|"RequestedAudioCapturePermission"|"RequestedVideoCapturePermission"|"RequestedBackForwardCacheBlockedSensors"|"RequestedBackgroundWorkPermission"|"BroadcastChannel"|"WebXR"|"SharedWorker"|"SharedWorkerMessage"|"WebLocks"|"WebHID"|"WebShare"|"RequestedStorageAccessGrant"|"WebNfc"|"OutstandingNetworkRequestFetch"|"OutstandingNetworkRequestXHR"|"AppBanner"|"Printing"|"WebDatabase"|"PictureInPicture"|"SpeechRecognizer"|"IdleManager"|"PaymentManager"|"SpeechSynthesis"|"KeyboardLock"|"WebOTPService"|"OutstandingNetworkRequestDirectSocket"|"InjectedJavascript"|"InjectedStyleSheet"|"KeepaliveRequest"|"IndexedDBEvent"|"Dummy"|"JsNetworkRequestReceivedCacheControlNoStoreResource"|"WebRTCUsedWithCCNS"|"WebTransportUsedWithCCNS"|"WebSocketUsedWithCCNS"|"SmartCard"|"LiveMediaStreamTrack"|"UnloadHandler"|"ParserAborted"|"ContentSecurityHandler"|"ContentWebAuthenticationAPI"|"ContentFileChooser"|"ContentSerial"|"ContentFileSystemAccess"|"ContentMediaDevicesDispatcherHost"|"ContentWebBluetooth"|"ContentWebUSB"|"ContentMediaSessionService"|"ContentScreenReader"|"ContentDiscarded"|"EmbedderPopupBlockerTabHelper"|"EmbedderSafeBrowsingTriggeredPopupBlocker"|"EmbedderSafeBrowsingThreatDetails"|"EmbedderAppBannerManager"|"EmbedderDomDistillerViewerSource"|"EmbedderDomDistillerSelfDeletingRequestDelegate"|"EmbedderOomInterventionTabHelper"|"EmbedderOfflinePage"|"EmbedderChromePasswordManagerClientBindCredentialManager"|"EmbedderPermissionRequestManager"|"EmbedderModalDialog"|"EmbedderExtensions"|"EmbedderExtensionMessaging"|"EmbedderExtensionMessagingForOpenPort"|"EmbedderExtensionSentMessageToCachedFrame"|"RequestedByWebViewClient"|"PostMessageByWebViewClient"|"CacheControlNoStoreDeviceBoundSessionTerminated"|"CacheLimitPrunedOnModerateMemoryPressure"|"CacheLimitPrunedOnCriticalMemoryPressure";
14264
+ export type BackForwardCacheNotRestoredReason = "NotPrimaryMainFrame"|"BackForwardCacheDisabled"|"RelatedActiveContentsExist"|"HTTPStatusNotOK"|"SchemeNotHTTPOrHTTPS"|"Loading"|"WasGrantedMediaAccess"|"DisableForRenderFrameHostCalled"|"DomainNotAllowed"|"HTTPMethodNotGET"|"SubframeIsNavigating"|"Timeout"|"CacheLimit"|"JavaScriptExecution"|"RendererProcessKilled"|"RendererProcessCrashed"|"SchedulerTrackedFeatureUsed"|"ConflictingBrowsingInstance"|"CacheFlushed"|"ServiceWorkerVersionActivation"|"SessionRestored"|"ServiceWorkerPostMessage"|"EnteredBackForwardCacheBeforeServiceWorkerHostAdded"|"RenderFrameHostReused_SameSite"|"RenderFrameHostReused_CrossSite"|"ServiceWorkerClaim"|"IgnoreEventAndEvict"|"HaveInnerContents"|"TimeoutPuttingInCache"|"BackForwardCacheDisabledByLowMemory"|"BackForwardCacheDisabledByCommandLine"|"NetworkRequestDatapipeDrainedAsBytesConsumer"|"NetworkRequestRedirected"|"NetworkRequestTimeout"|"NetworkExceedsBufferLimit"|"NavigationCancelledWhileRestoring"|"NotMostRecentNavigationEntry"|"BackForwardCacheDisabledForPrerender"|"UserAgentOverrideDiffers"|"ForegroundCacheLimit"|"BrowsingInstanceNotSwapped"|"BackForwardCacheDisabledForDelegate"|"UnloadHandlerExistsInMainFrame"|"UnloadHandlerExistsInSubFrame"|"ServiceWorkerUnregistration"|"CacheControlNoStore"|"CacheControlNoStoreCookieModified"|"CacheControlNoStoreHTTPOnlyCookieModified"|"NoResponseHead"|"Unknown"|"ActivationNavigationsDisallowedForBug1234857"|"ErrorDocument"|"FencedFramesEmbedder"|"CookieDisabled"|"HTTPAuthRequired"|"CookieFlushed"|"BroadcastChannelOnMessage"|"WebViewSettingsChanged"|"WebViewJavaScriptObjectChanged"|"WebViewMessageListenerInjected"|"WebViewSafeBrowsingAllowlistChanged"|"WebViewDocumentStartJavascriptChanged"|"WebSocket"|"WebTransport"|"WebRTC"|"MainResourceHasCacheControlNoStore"|"MainResourceHasCacheControlNoCache"|"SubresourceHasCacheControlNoStore"|"SubresourceHasCacheControlNoCache"|"ContainsPlugins"|"DocumentLoaded"|"OutstandingNetworkRequestOthers"|"RequestedMIDIPermission"|"RequestedAudioCapturePermission"|"RequestedVideoCapturePermission"|"RequestedBackForwardCacheBlockedSensors"|"RequestedBackgroundWorkPermission"|"BroadcastChannel"|"WebXR"|"SharedWorker"|"SharedWorkerMessage"|"SharedWorkerWithNoActiveClient"|"WebLocks"|"WebHID"|"WebBluetooth"|"WebShare"|"RequestedStorageAccessGrant"|"WebNfc"|"OutstandingNetworkRequestFetch"|"OutstandingNetworkRequestXHR"|"AppBanner"|"Printing"|"WebDatabase"|"PictureInPicture"|"SpeechRecognizer"|"IdleManager"|"PaymentManager"|"SpeechSynthesis"|"KeyboardLock"|"WebOTPService"|"OutstandingNetworkRequestDirectSocket"|"InjectedJavascript"|"InjectedStyleSheet"|"KeepaliveRequest"|"IndexedDBEvent"|"Dummy"|"JsNetworkRequestReceivedCacheControlNoStoreResource"|"WebRTCUsedWithCCNS"|"WebTransportUsedWithCCNS"|"WebSocketUsedWithCCNS"|"SmartCard"|"LiveMediaStreamTrack"|"UnloadHandler"|"ParserAborted"|"ContentSecurityHandler"|"ContentWebAuthenticationAPI"|"ContentFileChooser"|"ContentSerial"|"ContentFileSystemAccess"|"ContentMediaDevicesDispatcherHost"|"ContentWebBluetooth"|"ContentWebUSB"|"ContentMediaSessionService"|"ContentScreenReader"|"ContentDiscarded"|"EmbedderPopupBlockerTabHelper"|"EmbedderSafeBrowsingTriggeredPopupBlocker"|"EmbedderSafeBrowsingThreatDetails"|"EmbedderAppBannerManager"|"EmbedderDomDistillerViewerSource"|"EmbedderDomDistillerSelfDeletingRequestDelegate"|"EmbedderOomInterventionTabHelper"|"EmbedderOfflinePage"|"EmbedderChromePasswordManagerClientBindCredentialManager"|"EmbedderPermissionRequestManager"|"EmbedderModalDialog"|"EmbedderExtensions"|"EmbedderExtensionMessaging"|"EmbedderExtensionMessagingForOpenPort"|"EmbedderExtensionSentMessageToCachedFrame"|"RequestedByWebViewClient"|"PostMessageByWebViewClient"|"CacheControlNoStoreDeviceBoundSessionTerminated"|"CacheLimitPrunedOnModerateMemoryPressure"|"CacheLimitPrunedOnCriticalMemoryPressure";
14130
14265
  /**
14131
14266
  * Types of not restored reasons for back-forward cache.
14132
14267
  */
@@ -15777,6 +15912,11 @@ See also:
15777
15912
  * TODO(https://crbug.com/1425354): Replace this property with structured error.
15778
15913
  */
15779
15914
  errorMessage?: string;
15915
+ /**
15916
+ * For more details, see:
15917
+ https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md
15918
+ */
15919
+ tag?: string;
15780
15920
  }
15781
15921
  export type RuleSetErrorType = "SourceIsNotJsonObject"|"InvalidRulesSkipped"|"InvalidRulesetLevelTag";
15782
15922
  /**
@@ -17003,6 +17143,7 @@ associated shared storage worklet.
17003
17143
 
17004
17144
  /**
17005
17145
  * Returns a storage key given a frame id.
17146
+ Deprecated. Please use Storage.getStorageKey instead.
17006
17147
  */
17007
17148
  export type getStorageKeyForFrameParameters = {
17008
17149
  frameId: Page.FrameId;
@@ -17010,6 +17151,16 @@ associated shared storage worklet.
17010
17151
  export type getStorageKeyForFrameReturnValue = {
17011
17152
  storageKey: SerializedStorageKey;
17012
17153
  }
17154
+ /**
17155
+ * Returns storage key for the given frame. If no frame ID is provided,
17156
+ the storage key of the target executing this command is returned.
17157
+ */
17158
+ export type getStorageKeyParameters = {
17159
+ frameId?: Page.FrameId;
17160
+ }
17161
+ export type getStorageKeyReturnValue = {
17162
+ storageKey: SerializedStorageKey;
17163
+ }
17013
17164
  /**
17014
17165
  * Clears storage for origin.
17015
17166
  */
@@ -20187,6 +20338,10 @@ $x functions).
20187
20338
  default value is 32768 bytes.
20188
20339
  */
20189
20340
  samplingInterval?: number;
20341
+ /**
20342
+ * Maximum stack depth. The default value is 128.
20343
+ */
20344
+ stackDepth?: number;
20190
20345
  /**
20191
20346
  * By default, the sampling heap profiler reports only objects which are
20192
20347
  still alive when the profile is returned via getSamplingProfile or
@@ -20594,7 +20749,7 @@ per value in the scope of one CDP call.
20594
20749
  NOTE: If you change anything here, make sure to also update
20595
20750
  `subtype` in `ObjectPreview` and `PropertyPreview` below.
20596
20751
  */
20597
- subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue";
20752
+ subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue"|"trustedtype";
20598
20753
  /**
20599
20754
  * Object class (constructor) name. Specified for `object` type values only.
20600
20755
  */
@@ -20650,7 +20805,7 @@ The result value is json ML array.
20650
20805
  /**
20651
20806
  * Object subtype hint. Specified for `object` type values only.
20652
20807
  */
20653
- subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue";
20808
+ subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue"|"trustedtype";
20654
20809
  /**
20655
20810
  * String representation of the object.
20656
20811
  */
@@ -20688,7 +20843,7 @@ The result value is json ML array.
20688
20843
  /**
20689
20844
  * Object subtype hint. Specified for `object` type values only.
20690
20845
  */
20691
- subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue";
20846
+ subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue"|"trustedtype";
20692
20847
  }
20693
20848
  export interface EntryPreview {
20694
20849
  /**
@@ -21661,6 +21816,7 @@ Error was thrown.
21661
21816
  "DOM.pseudoElementAdded": DOM.pseudoElementAddedPayload;
21662
21817
  "DOM.topLayerElementsUpdated": DOM.topLayerElementsUpdatedPayload;
21663
21818
  "DOM.scrollableFlagUpdated": DOM.scrollableFlagUpdatedPayload;
21819
+ "DOM.affectedByStartingStylesFlagUpdated": DOM.affectedByStartingStylesFlagUpdatedPayload;
21664
21820
  "DOM.pseudoElementRemoved": DOM.pseudoElementRemovedPayload;
21665
21821
  "DOM.setChildNodes": DOM.setChildNodesPayload;
21666
21822
  "DOM.shadowRootPopped": DOM.shadowRootPoppedPayload;
@@ -22167,6 +22323,7 @@ Error was thrown.
22167
22323
  "Memory.getBrowserSamplingProfile": Memory.getBrowserSamplingProfileParameters;
22168
22324
  "Memory.getSamplingProfile": Memory.getSamplingProfileParameters;
22169
22325
  "Network.getIPProtectionProxyStatus": Network.getIPProtectionProxyStatusParameters;
22326
+ "Network.setIPProtectionProxyBypassEnabled": Network.setIPProtectionProxyBypassEnabledParameters;
22170
22327
  "Network.setAcceptedEncodings": Network.setAcceptedEncodingsParameters;
22171
22328
  "Network.clearAcceptedEncodingsOverride": Network.clearAcceptedEncodingsOverrideParameters;
22172
22329
  "Network.canClearBrowserCache": Network.canClearBrowserCacheParameters;
@@ -22178,6 +22335,8 @@ Error was thrown.
22178
22335
  "Network.deleteCookies": Network.deleteCookiesParameters;
22179
22336
  "Network.disable": Network.disableParameters;
22180
22337
  "Network.emulateNetworkConditions": Network.emulateNetworkConditionsParameters;
22338
+ "Network.emulateNetworkConditionsByRule": Network.emulateNetworkConditionsByRuleParameters;
22339
+ "Network.overrideNetworkState": Network.overrideNetworkStateParameters;
22181
22340
  "Network.enable": Network.enableParameters;
22182
22341
  "Network.getAllCookies": Network.getAllCookiesParameters;
22183
22342
  "Network.getCertificate": Network.getCertificateParameters;
@@ -22323,6 +22482,7 @@ Error was thrown.
22323
22482
  "ServiceWorker.unregister": ServiceWorker.unregisterParameters;
22324
22483
  "ServiceWorker.updateRegistration": ServiceWorker.updateRegistrationParameters;
22325
22484
  "Storage.getStorageKeyForFrame": Storage.getStorageKeyForFrameParameters;
22485
+ "Storage.getStorageKey": Storage.getStorageKeyParameters;
22326
22486
  "Storage.clearDataForOrigin": Storage.clearDataForOriginParameters;
22327
22487
  "Storage.clearDataForStorageKey": Storage.clearDataForStorageKeyParameters;
22328
22488
  "Storage.getCookies": Storage.getCookiesParameters;
@@ -22809,6 +22969,7 @@ Error was thrown.
22809
22969
  "Memory.getBrowserSamplingProfile": Memory.getBrowserSamplingProfileReturnValue;
22810
22970
  "Memory.getSamplingProfile": Memory.getSamplingProfileReturnValue;
22811
22971
  "Network.getIPProtectionProxyStatus": Network.getIPProtectionProxyStatusReturnValue;
22972
+ "Network.setIPProtectionProxyBypassEnabled": Network.setIPProtectionProxyBypassEnabledReturnValue;
22812
22973
  "Network.setAcceptedEncodings": Network.setAcceptedEncodingsReturnValue;
22813
22974
  "Network.clearAcceptedEncodingsOverride": Network.clearAcceptedEncodingsOverrideReturnValue;
22814
22975
  "Network.canClearBrowserCache": Network.canClearBrowserCacheReturnValue;
@@ -22820,6 +22981,8 @@ Error was thrown.
22820
22981
  "Network.deleteCookies": Network.deleteCookiesReturnValue;
22821
22982
  "Network.disable": Network.disableReturnValue;
22822
22983
  "Network.emulateNetworkConditions": Network.emulateNetworkConditionsReturnValue;
22984
+ "Network.emulateNetworkConditionsByRule": Network.emulateNetworkConditionsByRuleReturnValue;
22985
+ "Network.overrideNetworkState": Network.overrideNetworkStateReturnValue;
22823
22986
  "Network.enable": Network.enableReturnValue;
22824
22987
  "Network.getAllCookies": Network.getAllCookiesReturnValue;
22825
22988
  "Network.getCertificate": Network.getCertificateReturnValue;
@@ -22965,6 +23128,7 @@ Error was thrown.
22965
23128
  "ServiceWorker.unregister": ServiceWorker.unregisterReturnValue;
22966
23129
  "ServiceWorker.updateRegistration": ServiceWorker.updateRegistrationReturnValue;
22967
23130
  "Storage.getStorageKeyForFrame": Storage.getStorageKeyForFrameReturnValue;
23131
+ "Storage.getStorageKey": Storage.getStorageKeyReturnValue;
22968
23132
  "Storage.clearDataForOrigin": Storage.clearDataForOriginReturnValue;
22969
23133
  "Storage.clearDataForStorageKey": Storage.clearDataForStorageKeyReturnValue;
22970
23134
  "Storage.getCookies": Storage.getCookiesReturnValue;
package/types/types.d.ts CHANGED
@@ -11211,6 +11211,12 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
11211
11211
  y: number;
11212
11212
  };
11213
11213
 
11214
+ /**
11215
+ * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
11216
+ * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
11217
+ */
11218
+ steps?: number;
11219
+
11214
11220
  /**
11215
11221
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11216
11222
  * option in the config, or by using the
@@ -11294,6 +11300,12 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
11294
11300
  y: number;
11295
11301
  };
11296
11302
 
11303
+ /**
11304
+ * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
11305
+ * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
11306
+ */
11307
+ steps?: number;
11308
+
11297
11309
  /**
11298
11310
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11299
11311
  * option in the config, or by using the
@@ -12788,6 +12800,12 @@ export interface Locator {
12788
12800
  y: number;
12789
12801
  };
12790
12802
 
12803
+ /**
12804
+ * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
12805
+ * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
12806
+ */
12807
+ steps?: number;
12808
+
12791
12809
  /**
12792
12810
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12793
12811
  * option in the config, or by using the
@@ -12905,6 +12923,12 @@ export interface Locator {
12905
12923
  y: number;
12906
12924
  };
12907
12925
 
12926
+ /**
12927
+ * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
12928
+ * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
12929
+ */
12930
+ steps?: number;
12931
+
12908
12932
  /**
12909
12933
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12910
12934
  * option in the config, or by using the
@@ -20293,7 +20317,8 @@ export interface Mouse {
20293
20317
  */
20294
20318
  move(x: number, y: number, options?: {
20295
20319
  /**
20296
- * Defaults to 1. Sends intermediate `mousemove` events.
20320
+ * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
20321
+ * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
20297
20322
  */
20298
20323
  steps?: number;
20299
20324
  }): Promise<void>;
@@ -1,2 +0,0 @@
1
- import{M as m,r,T as M,W as C,j as e,D as F,a as I,b as k,c as z,d as O,e as V}from"./assets/defaultSettingsView-B24Q0BeR.js";const $=()=>{const[o,i]=r.useState(!1),[c,l]=r.useState(),[h,u]=r.useState(),[g,L]=r.useState(N),[p,x]=r.useState({done:0,total:0}),[b,v]=r.useState(!1),[j,S]=r.useState(null),[y,P]=r.useState(null),[R,E]=r.useState(!1),w=r.useCallback(t=>{const s=new URL(window.location.href);if(!t.length)return;const n=t.item(0),a=URL.createObjectURL(n);s.searchParams.append("trace",a);const d=s.toString();window.history.pushState({},"",d),l(a),u(n.name),v(!1),S(null)},[]);r.useEffect(()=>{const t=async s=>{var n;if((n=s.clipboardData)!=null&&n.files.length){for(const a of s.clipboardData.files)if(a.type!=="application/zip")return;s.preventDefault(),w(s.clipboardData.files)}};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),r.useEffect(()=>{const t=s=>{const{method:n,params:a}=s.data;if(n!=="load"||!((a==null?void 0:a.trace)instanceof Blob))return;const d=new File([a.trace],"trace.zip",{type:"application/zip"}),f=new DataTransfer;f.items.add(d),w(f.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const U=r.useCallback(t=>{t.preventDefault(),w(t.dataTransfer.files)},[w]),W=r.useCallback(t=>{t.preventDefault(),t.target.files&&w(t.target.files)},[w]);r.useEffect(()=>{const t=new URL(window.location.href).searchParams,s=t.get("trace");if(i(t.has("isServer")),s!=null&&s.startsWith("file:")){P(s||null);return}if(t.has("isServer")){const n=new URLSearchParams(window.location.search).get("ws"),a=new URL(`../${n}`,window.location.toString());a.protocol=window.location.protocol==="https:"?"wss:":"ws:";const d=new M(new C(a));d.onLoadTraceRequested(async f=>{l(f.traceUrl),v(!1),S(null)}),d.initialize({}).catch(()=>{})}else s&&!s.startsWith("blob:")&&l(s)},[]),r.useEffect(()=>{(async()=>{if(!c){L(N);return}const t=s=>{s.data.method==="progress"&&x(s.data.params)};try{navigator.serviceWorker.addEventListener("message",t),x({done:0,total:1});const s=new URLSearchParams;s.set("trace",c);const n=await fetch(`contexts?${s.toString()}`);if(!n.ok){o||l(void 0),S((await n.json()).error);return}const a=await n.json(),d=new m(c,a);x({done:0,total:0}),L(d)}finally{navigator.serviceWorker.removeEventListener("message",t)}})()},[o,c,h]);const D=p.done!==p.total&&p.total!==0&&!j;r.useEffect(()=>{if(D){const t=setTimeout(()=>{E(!0)},200);return()=>clearTimeout(t)}else E(!1)},[D]);const T=!!(!o&&!b&&!y&&(!c||j));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),v(!0)},children:[e.jsxs("div",{className:"hbox header",...T?{inert:!0}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),g.title&&e.jsx("div",{className:"title",children:g.title}),e.jsx("div",{className:"spacer"}),e.jsx(F,{icon:"settings-gear",title:"Settings",dialogDataTestId:"settings-toolbar-dialog",children:e.jsx(I,{})})]}),e.jsx(k,{model:g,inert:T}),y&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses Service Workers to show traces. To view trace:"}),e.jsxs("div",{style:{paddingTop:20},children:[e.jsxs("div",{children:["1. Click ",e.jsx("a",{href:y,children:"here"})," to put your trace into the download shelf"]}),e.jsxs("div",{children:["2. Go to ",e.jsx("a",{href:"https://trace.playwright.dev",children:"trace.playwright.dev"})]}),e.jsx("div",{children:"3. Drop the trace from the download shelf into the page"})]})]}),e.jsx(z,{open:R,isModal:!0,className:"progress-dialog",children:e.jsxs("div",{className:"progress-content",children:[e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Loading Playwright Trace..."}),e.jsx("div",{className:"progress-wrapper",children:e.jsx("div",{className:"inner-progress",style:{width:p.total?100*p.done/p.total+"%":0}})})]})}),T&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{className:"processing-error",role:"alert",children:j}),e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Drop Playwright Trace to load"}),e.jsx("div",{children:"or"}),e.jsx("button",{onClick:()=>{const t=document.createElement("input");t.type="file",t.click(),t.addEventListener("change",s=>W(s))},type:"button",children:"Select file"}),e.jsx("div",{className:"info",children:"Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere, it opens it locally."}),e.jsxs("div",{className:"version",children:["Playwright v","1.57.0-next"]})]}),o&&!c&&e.jsx("div",{className:"drop-target",children:e.jsx("div",{className:"title",children:"Select test to see the trace"})}),b&&e.jsx("div",{className:"drop-target",onDragLeave:()=>{v(!1)},onDrop:t=>U(t),children:e.jsx("div",{className:"title",children:"Release to analyse the Playwright Trace"})})]})},N=new m("",[]),q=({traceJson:o})=>{const[i,c]=r.useState(void 0),[l,h]=r.useState(0),u=r.useRef(null);return r.useEffect(()=>(u.current&&clearTimeout(u.current),u.current=setTimeout(async()=>{try{const g=await A(o);c(g)}catch{const g=new m("",[]);c(g)}finally{h(l+1)}},500),()=>{u.current&&clearTimeout(u.current)}),[o,l]),e.jsx(k,{isLive:!0,model:i})};async function A(o){const i=new URLSearchParams;i.set("trace",o);const l=await(await fetch(`contexts?${i.toString()}`)).json();return new m(o,l)}(async()=>{const o=new URLSearchParams(window.location.search);if(O(),window.location.protocol!=="file:"){if(o.get("isUnderTest")==="true"&&await new Promise(h=>setTimeout(h,1e3)),!navigator.serviceWorker)throw new Error(`Service workers are not supported.
2
- Make sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(h=>{navigator.serviceWorker.oncontrollerchange=()=>h()}),setInterval(function(){fetch("ping")},1e4)}const i=o.get("trace"),l=(i==null?void 0:i.endsWith(".json"))?e.jsx(q,{traceJson:i}):e.jsx($,{});V.createRoot(document.querySelector("#root")).render(l)})();