From fa001eb0ff11b7f9827b75a39e545f16e6bb25e9 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Thu, 16 Mar 2023 16:37:27 +0100 Subject: [PATCH] [CDP] Adding v111 and removing v108 --- Rakefile | 2 +- .../chromium/{v108 => v111}/BUILD.bazel | 0 .../{v108 => v111}/browser_protocol.pdl | 380 +++++++++++++++--- .../chromium/{v108 => v111}/js_protocol.pdl | 16 +- dotnet/selenium-dotnet-version.bzl | 2 +- .../src/webdriver/DevTools/DevToolsDomains.cs | 2 +- .../V108Domains.cs => v111/V111Domains.cs} | 20 +- .../V111JavaScript.cs} | 16 +- .../{v108/V108Log.cs => v111/V111Log.cs} | 14 +- .../V108Network.cs => v111/V111Network.cs} | 32 +- .../V108Target.cs => v111/V111Target.cs} | 14 +- .../webdriver/WebDriver.csproj.prebuild.cmd | 14 +- .../webdriver/WebDriver.csproj.prebuild.sh | 12 +- .../common/DevTools/DevToolsConsoleTest.cs | 4 +- .../test/common/DevTools/DevToolsLogTest.cs | 6 +- .../common/DevTools/DevToolsNetworkTest.cs | 144 +++---- .../DevTools/DevToolsPerformanceTest.cs | 30 +- .../common/DevTools/DevToolsProfilerTest.cs | 18 +- .../common/DevTools/DevToolsSecurityTest.cs | 10 +- .../common/DevTools/DevToolsTargetTest.cs | 52 +-- .../devtools/{v108 => v111}/BUILD.bazel | 2 +- .../v111CdpInfo.java} | 9 +- .../v111Domains.java} | 26 +- .../V108Events.java => v111/v111Events.java} | 18 +- .../v111Javascript.java} | 14 +- .../{v108/V108Log.java => v111/v111Log.java} | 10 +- .../v111Network.java} | 31 +- .../V108Target.java => v111/v111Target.java} | 25 +- .../org/openqa/selenium/devtools/versions.bzl | 2 +- .../node/selenium-webdriver/BUILD.bazel | 2 +- py/BUILD.bazel | 2 +- rb/lib/selenium/devtools/BUILD.bazel | 2 +- rb/lib/selenium/devtools/version.rb | 2 +- 33 files changed, 617 insertions(+), 316 deletions(-) rename common/devtools/chromium/{v108 => v111}/BUILD.bazel (100%) rename common/devtools/chromium/{v108 => v111}/browser_protocol.pdl (96%) rename common/devtools/chromium/{v108 => v111}/js_protocol.pdl (98%) rename dotnet/src/webdriver/DevTools/{v108/V108Domains.cs => v111/V111Domains.cs} (79%) rename dotnet/src/webdriver/DevTools/{v108/V108JavaScript.cs => v111/V111JavaScript.cs} (94%) rename dotnet/src/webdriver/DevTools/{v108/V108Log.cs => v111/V111Log.cs} (88%) rename dotnet/src/webdriver/DevTools/{v108/V108Network.cs => v111/V111Network.cs} (93%) rename dotnet/src/webdriver/DevTools/{v108/V108Target.cs => v111/V111Target.cs} (93%) rename java/src/org/openqa/selenium/devtools/{v108 => v111}/BUILD.bazel (98%) rename java/src/org/openqa/selenium/devtools/{v108/V108CdpInfo.java => v111/v111CdpInfo.java} (86%) rename java/src/org/openqa/selenium/devtools/{v108/V108Domains.java => v111/v111Domains.java} (77%) rename java/src/org/openqa/selenium/devtools/{v108/V108Events.java => v111/v111Events.java} (86%) rename java/src/org/openqa/selenium/devtools/{v108/V108Javascript.java => v111/v111Javascript.java} (85%) rename java/src/org/openqa/selenium/devtools/{v108/V108Log.java => v111/v111Log.java} (89%) rename java/src/org/openqa/selenium/devtools/{v108/V108Network.java => v111/v111Network.java} (89%) rename java/src/org/openqa/selenium/devtools/{v108/V108Target.java => v111/v111Target.java} (83%) diff --git a/Rakefile b/Rakefile index 10b0d7355a43c..35821759fd0f0 100644 --- a/Rakefile +++ b/Rakefile @@ -98,9 +98,9 @@ task '//java/test/org/openqa/selenium/environment/webserver:webserver:uber' => [ JAVA_RELEASE_TARGETS = %w[ //java/src/org/openqa/selenium/chrome:chrome.publish //java/src/org/openqa/selenium/chromium:chromium.publish - //java/src/org/openqa/selenium/devtools/v108:v108.publish //java/src/org/openqa/selenium/devtools/v109:v109.publish //java/src/org/openqa/selenium/devtools/v110:v110.publish + //java/src/org/openqa/selenium/devtools/v111:v111.publish //java/src/org/openqa/selenium/devtools/v85:v85.publish //java/src/org/openqa/selenium/edge:edge.publish //java/src/org/openqa/selenium/firefox:firefox.publish diff --git a/common/devtools/chromium/v108/BUILD.bazel b/common/devtools/chromium/v111/BUILD.bazel similarity index 100% rename from common/devtools/chromium/v108/BUILD.bazel rename to common/devtools/chromium/v111/BUILD.bazel diff --git a/common/devtools/chromium/v108/browser_protocol.pdl b/common/devtools/chromium/v111/browser_protocol.pdl similarity index 96% rename from common/devtools/chromium/v108/browser_protocol.pdl rename to common/devtools/chromium/v111/browser_protocol.pdl index 43407720fdfb1..e0ad18dc66fc1 100644 --- a/common/devtools/chromium/v108/browser_protocol.pdl +++ b/common/devtools/chromium/v111/browser_protocol.pdl @@ -482,6 +482,7 @@ experimental domain Audits ExcludeInvalidSameParty ExcludeSamePartyCrossPartyContext ExcludeDomainNonASCII + ExcludeThirdPartyCookieBlockedInFirstPartySet type CookieWarningReason extends string enum @@ -742,6 +743,11 @@ experimental domain Audits type GenericIssueErrorType extends string enum CrossOriginPortalPostMessageError + FormLabelForNameError + FormDuplicateIdForInputError + FormInputWithNoLabelError + FormAutocompleteAttributeEmptyError + FormEmptyIdAndNameAttributesForInputError # Depending on the concrete errorType, different properties are set. type GenericIssueDetails extends object @@ -749,6 +755,7 @@ experimental domain Audits # Issues with the same errorType are aggregated in the frontend. GenericIssueErrorType errorType optional Page.FrameId frameId + optional DOM.BackendNodeId violatingNodeId type DeprecationIssueType extends string enum @@ -778,6 +785,7 @@ experimental domain Audits NoSysexWebMIDIWithoutPermission NotificationInsecureOrigin NotificationPermissionRequestedIframe + ObsoleteCreateImageBitmapImageOrientationNone ObsoleteWebRtcCipherSuite OpenWebDatabaseInsecureContext OverflowVisibleOnReplacedElement @@ -792,6 +800,7 @@ experimental domain Audits PrefixedVideoEnterFullscreen PrefixedVideoExitFullscreen PrefixedVideoSupportsFullscreen + PrivacySandboxExtensionsAPI RangeExpand RequestedSubresourceWithEmbeddedCredentials RTCConstraintEnableDtlsSrtpFalse @@ -835,14 +844,15 @@ experimental domain Audits enum ShouldEmbargo TooManyRequests - ManifestListHttpNotFound - ManifestListNoResponse - ManifestListInvalidResponse - ManifestNotInManifestList - ManifestListTooBig - ManifestHttpNotFound - ManifestNoResponse - ManifestInvalidResponse + WellKnownHttpNotFound + WellKnownNoResponse + WellKnownInvalidResponse + WellKnownListEmpty + ConfigNotInWellKnown + WellKnownTooBig + ConfigHttpNotFound + ConfigNoResponse + ConfigInvalidResponse ClientMetadataHttpNotFound ClientMetadataNoResponse ClientMetadataInvalidResponse @@ -852,6 +862,7 @@ experimental domain Audits AccountsHttpNotFound AccountsNoResponse AccountsInvalidResponse + AccountsListEmpty IdTokenHttpNotFound IdTokenNoResponse IdTokenInvalidResponse @@ -1028,6 +1039,8 @@ experimental domain BackgroundService string instanceId # A list of event-specific information. array of EventMetadata eventMetadata + # Storage key this event belongs to. + string storageKey # Called with all existing backgroundServiceEvents when enabled, and all new # events afterwards if enabled and recording. @@ -1074,6 +1087,8 @@ domain Browser durableStorage flash geolocation + idleDetection + localFonts midi midiSysex nfc @@ -1082,11 +1097,13 @@ domain Browser periodicBackgroundSync protectedMediaIdentifier sensors + storageAccess + topLevelStorageAccess videoCapture videoCapturePanTiltZoom - idleDetection wakeLockScreen wakeLockSystem + windowManagement experimental type PermissionSetting extends string enum @@ -1257,7 +1274,7 @@ domain Browser # substring in their name are extracted. An empty or absent query returns # all histograms. optional string query - # If true, retrieve delta since last call. + # If true, retrieve delta since last delta call. optional boolean delta returns @@ -1269,7 +1286,7 @@ domain Browser parameters # Requested histogram name. string name - # If true, retrieve delta since last call. + # If true, retrieve delta since last delta call. optional boolean delta returns # Histogram. @@ -1598,6 +1615,10 @@ experimental domain CSS optional StyleSheetId styleSheetId # Optional name for the container. optional string name + # Optional physical axes queried for the container. + optional DOM.PhysicalAxes physicalAxes + # Optional logical axes queried for the container. + optional DOM.LogicalAxes logicalAxes # CSS Supports at-rule descriptor. experimental type CSSSupports extends object @@ -2057,6 +2078,8 @@ experimental domain CacheStorage CacheId cacheId # Security origin of the cache. string securityOrigin + # Storage key of the cache. + string storageKey # The name of the cache. string cacheName @@ -2088,8 +2111,11 @@ experimental domain CacheStorage # Requests cache names. command requestCacheNames parameters + # At least and at most one of securityOrigin, storageKey must be specified. # Security origin. - string securityOrigin + optional string securityOrigin + # Storage key. + optional string storageKey returns # Caches for the security origin. array of Cache caches @@ -2232,11 +2258,11 @@ domain DOM scrollbar-corner resizer input-list-button - page-transition - page-transition-container - page-transition-image-wrapper - page-transition-outgoing-image - page-transition-incoming-image + view-transition + view-transition-group + view-transition-image-pair + view-transition-old + view-transition-new # Shadow root type. type ShadowRootType extends string @@ -2252,6 +2278,20 @@ domain DOM LimitedQuirksMode NoQuirksMode + # ContainerSelector physical axes + type PhysicalAxes extends string + enum + Horizontal + Vertical + Both + + # ContainerSelector logical axes + type LogicalAxes extends string + enum + Inline + Block + Both + # DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. # DOMNode is a base node mirror type. type Node extends object @@ -2864,13 +2904,16 @@ domain DOM # Id of the node at given coordinates, only when enabled and requested document. optional NodeId nodeId - # Returns the container of the given node based on container query conditions. - # If containerName is given, it will find the nearest container with a matching name; - # otherwise it will find the nearest container regardless of its container name. + # Returns the query container of the given node based on container query + # conditions: containerName, physical, and logical axes. If no axes are + # provided, the style container is returned, which is the direct parent or the + # closest element with a matching container-name. experimental command getContainerForNode parameters NodeId nodeId optional string containerName + optional PhysicalAxes physicalAxes + optional LogicalAxes logicalAxes returns # The container node for the given node, or null if not found. optional NodeId nodeId @@ -3640,7 +3683,9 @@ domain Emulation # Missing optional values will be filled in by the target with what it would normally use. experimental type UserAgentMetadata extends object properties + # Brands appearing in Sec-CH-UA. optional array of UserAgentBrandVersion brands + # Brands appearing in Sec-CH-UA-Full-Version-List. optional array of UserAgentBrandVersion fullVersionList deprecated optional string fullVersion string platform @@ -3863,7 +3908,6 @@ domain Emulation experimental type DisabledImageType extends string enum avif - jxl webp experimental command setDisabledImageTypes @@ -3906,8 +3950,11 @@ experimental domain HeadlessExperimental optional enum format jpeg png + webp # Compression quality from range [0..100] (jpeg only). optional integer quality + # Optimize image encoding for speed, not for resulting size (defaults to false) + optional boolean optimizeForSpeed # Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a # screenshot from the resulting frame. Requires that the target was created with enabled @@ -3937,18 +3984,10 @@ experimental domain HeadlessExperimental optional binary screenshotData # Disables headless events for the target. - command disable + deprecated command disable # Enables headless events for the target. - command enable - - # Issued when the target starts or stops needing BeginFrames. - # Deprecated. Issue beginFrame unconditionally instead and use result from - # beginFrame to detect whether the frames were suppressed. - deprecated event needsBeginFramesChanged - parameters - # True if BeginFrames are needed, false otherwise. - boolean needsBeginFrames + deprecated command enable # Input/Output operations for streams produced by DevTools. domain IO @@ -5233,9 +5272,9 @@ domain Network # are specified in third_party/blink/renderer/core/fetch/trust_token.idl. experimental type TrustTokenParams extends object properties - TrustTokenOperationType type + TrustTokenOperationType operation - # Only set for "token-redemption" type and determine whether + # Only set for "token-redemption" operation and determine whether # to request a fresh SRR or use a still valid cached SRR. enum refreshPolicy UseCached @@ -5457,6 +5496,9 @@ domain Network SameSiteNoneInsecure # The cookie was not stored due to user preferences. UserPreferences + # The cookie was blocked by third-party cookie blocking between sites in + # the same First-Party Set. + ThirdPartyBlockedInFirstPartySet # The syntax of the Set-Cookie header of the response was invalid. SyntaxError # The scheme of the connection is not allowed to store cookies. @@ -5521,6 +5563,9 @@ domain Network SameSiteNoneInsecure # The cookie was not sent due to user preferences. UserPreferences + # The cookie was blocked by third-party cookie blocking between sites in + # the same First-Party Set. + ThirdPartyBlockedInFirstPartySet # An unknown error was encountered when trying to send this cookie. UnknownError # The cookie had the "SameSite=Strict" attribute but came from a response @@ -5831,7 +5876,8 @@ domain Network # Returns all browser cookies. Depending on the backend support, will return detailed cookie # information in the `cookies` field. - command getAllCookies + # Deprecated. Use Storage.getCookies instead. + deprecated command getAllCookies returns # Array of cookie objects. array of Cookie cookies @@ -6328,6 +6374,8 @@ domain Network experimental ConnectTiming connectTiming # The client security state set for the request. optional ClientSecurityState clientSecurityState + # Whether the site has partitioned cookies stored in a partition different than the current one. + optional boolean siteHasCookieInOtherPartition # Fired when additional information about a responseReceived event is available from the network # stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for @@ -6352,6 +6400,11 @@ domain Network # Raw response header text as it was received over the wire. The raw text may not always be # available, such as in the case of HTTP/2 or QUIC. optional string headersText + # The cookie partition key that will be used to store partitioned cookies set in this response. + # Only sent when partitioned cookies are enabled. + optional string cookiePartitionKey + # True if partitioned cookies are enabled, but the partition key is not serializeable to string. + optional boolean cookiePartitionKeyOpaque # Fired exactly once for each Trust Token operation. Depending on # the type of the operation and whether the operation succeeded or @@ -6370,6 +6423,7 @@ domain Network ResourceExhausted AlreadyExists Unavailable + Unauthorized BadResponse InternalError UnknownError @@ -7150,6 +7204,7 @@ domain Page ch-width clipboard-read clipboard-write + compute-pressure cross-origin-isolated direct-sockets display-capture @@ -7176,12 +7231,15 @@ domain Page otp-credentials payment picture-in-picture + private-aggregation publickey-credentials-get run-ad-auction screen-wake-lock serial shared-autofill shared-storage + shared-storage-select-url + smart-card storage-access sync-xhr trust-token-redemption @@ -7189,6 +7247,8 @@ domain Page usb vertical-scroll web-share + # Alias for 'window-placement' (crbug.com/1328581). + window-management window-placement xr-spatial-tracking @@ -7593,6 +7653,8 @@ domain Page experimental optional boolean fromSurface # Capture the screenshot beyond the viewport. Defaults to false. experimental optional boolean captureBeyondViewport + # Optimize image encoding for speed, not for resulting size (defaults to false) + experimental optional boolean optimizeForSpeed returns # Base64-encoded image data. binary data @@ -7680,6 +7742,14 @@ domain Page # Recommendation for manifest's id attribute to match current id computed from start_url optional string recommendedId + experimental command getAdScriptId + parameters + FrameId frameId + returns + # Identifies the bottom-most script which caused the frame to be labelled + # as an ad. Only sent if frame is labelled as an ad and id is available. + optional AdScriptId adScriptId + # Returns all browser cookies for the page and all of its subframes. Depending # on the backend support, will return detailed cookie information in the # `cookies` field. @@ -8079,8 +8149,9 @@ domain Page parameters enum mode none - autoaccept - autoreject + autoAccept + autoReject + autoOptOut # Generates a report for testing. experimental command generateTestReport @@ -8125,9 +8196,6 @@ domain Page FrameId parentFrameId # JavaScript stack trace of when frame was attached, only set if frame initiated from script. optional Runtime.StackTrace stack - # Identifies the bottom-most script which caused the frame to be labelled - # as an ad. Only sent if frame is labelled as an ad and id is available. - experimental optional AdScriptId adScriptId # Fired when frame no longer has a scheduled navigation. deprecated event frameClearedScheduledNavigation @@ -8346,7 +8414,6 @@ domain Page DedicatedWorkerOrWorklet OutstandingNetworkRequestOthers OutstandingIndexedDBTransaction - RequestedNotificationsPermission RequestedMIDIPermission RequestedAudioCapturePermission RequestedVideoCapturePermission @@ -8377,8 +8444,11 @@ domain Page OutstandingNetworkRequestDirectSocket InjectedJavascript InjectedStyleSheet + KeepaliveRequest + IndexedDBEvent Dummy - # Disabled for render frame host reasons + AuthorizationHeader + # Disabled for RenderFrameHost reasons # See content/browser/renderer_host/back_forward_cache_disable.h for explanations. ContentSecurityHandler ContentWebAuthenticationAPI @@ -8457,8 +8527,6 @@ domain Page Activated Destroyed LowEndDevice - CrossOriginRedirect - CrossOriginNavigation InvalidSchemeRedirect InvalidSchemeNavigation InProgressNavigation @@ -8495,6 +8563,21 @@ domain Page InactivePageRestriction StartFailed TimeoutBackgrounded + CrossSiteRedirect + CrossSiteNavigation + SameSiteCrossOriginRedirect + SameSiteCrossOriginNavigation + SameSiteCrossOriginRedirectNotOptIn + SameSiteCrossOriginNavigationNotOptIn + ActivationNavigationParameterMismatch + ActivatedInBackground + EmbedderHostDisallowed + ActivationNavigationDestroyedBeforeSuccess + TabClosedByUserGesture + TabClosedWithoutUserGesture + PrimaryMainFrameRendererProcessCrashed + PrimaryMainFrameRendererProcessKilled + ActivationFramePolicyNotCompatible # Fired when a prerender attempt is completed. experimental event prerenderAttemptCompleted @@ -9001,6 +9084,7 @@ experimental domain Storage service_workers cache_storage interest_groups + shared_storage all other @@ -9025,6 +9109,7 @@ experimental domain Storage join leave update + loaded bid win @@ -9050,6 +9135,91 @@ experimental domain Storage array of InterestGroupAd ads array of InterestGroupAd adComponents + # Enum of shared storage access types. + type SharedStorageAccessType extends string + enum + documentAddModule + documentSelectURL + documentRun + documentSet + documentAppend + documentDelete + documentClear + workletSet + workletAppend + workletDelete + workletClear + workletGet + workletKeys + workletEntries + workletLength + workletRemainingBudget + + # Struct for a single key-value pair in an origin's shared storage. + type SharedStorageEntry extends object + properties + string key + string value + + # Details for an origin's shared storage. + type SharedStorageMetadata extends object + properties + Network.TimeSinceEpoch creationTime + integer length + number remainingBudget + + # Pair of reporting metadata details for a candidate URL for `selectURL()`. + type SharedStorageReportingMetadata extends object + properties + string eventType + string reportingUrl + + # Bundles a candidate URL with its reporting metadata. + type SharedStorageUrlWithMetadata extends object + properties + # Spec of candidate URL. + string url + # Any associated reporting metadata. + array of SharedStorageReportingMetadata reportingMetadata + + # Bundles the parameters for shared storage access events whose + # presence/absence can vary according to SharedStorageAccessType. + type SharedStorageAccessParams extends object + properties + # Spec of the module script URL. + # Present only for SharedStorageAccessType.documentAddModule. + optional string scriptSourceUrl + # Name of the registered operation to be run. + # Present only for SharedStorageAccessType.documentRun and + # SharedStorageAccessType.documentSelectURL. + optional string operationName + # The operation's serialized data in bytes (converted to a string). + # Present only for SharedStorageAccessType.documentRun and + # SharedStorageAccessType.documentSelectURL. + optional string serializedData + # Array of candidate URLs' specs, along with any associated metadata. + # Present only for SharedStorageAccessType.documentSelectURL. + optional array of SharedStorageUrlWithMetadata urlsWithMetadata + # Key for a specific entry in an origin's shared storage. + # Present only for SharedStorageAccessType.documentSet, + # SharedStorageAccessType.documentAppend, + # SharedStorageAccessType.documentDelete, + # SharedStorageAccessType.workletSet, + # SharedStorageAccessType.workletAppend, + # SharedStorageAccessType.workletDelete, and + # SharedStorageAccessType.workletGet. + optional string key + # Value for a specific entry in an origin's shared storage. + # Present only for SharedStorageAccessType.documentSet, + # SharedStorageAccessType.documentAppend, + # SharedStorageAccessType.workletSet, and + # SharedStorageAccessType.workletAppend. + optional string value + # Whether or not to set an entry for a key if that key is already present. + # Present only for SharedStorageAccessType.documentSet and + # SharedStorageAccessType.workletSet. + optional boolean ignoreIfPresent + # Returns a storage key given a frame id. command getStorageKeyForFrame parameters @@ -9131,6 +9301,12 @@ experimental domain Storage # Security origin. string origin + # Registers storage key to be notified when an update occurs to its cache storage list. + command trackCacheStorageForStorageKey + parameters + # Storage key. + string storageKey + # Registers origin to be notified when an update occurs to its IndexedDB. command trackIndexedDBForOrigin parameters @@ -9149,6 +9325,12 @@ experimental domain Storage # Security origin. string origin + # Unregisters storage key from receiving notifications for cache storage. + command untrackCacheStorageForStorageKey + parameters + # Storage key. + string storageKey + # Unregisters origin from receiving notifications for IndexedDB. command untrackIndexedDBForOrigin parameters @@ -9189,11 +9371,58 @@ experimental domain Storage parameters boolean enable + # Gets metadata for an origin's shared storage. + experimental command getSharedStorageMetadata + parameters + string ownerOrigin + returns + SharedStorageMetadata metadata + + # Gets the entries in an given origin's shared storage. + experimental command getSharedStorageEntries + parameters + string ownerOrigin + returns + array of SharedStorageEntry entries + + # Sets entry with `key` and `value` for a given origin's shared storage. + experimental command setSharedStorageEntry + parameters + string ownerOrigin + string key + string value + # If `ignoreIfPresent` is included and true, then only sets the entry if + # `key` doesn't already exist. + optional boolean ignoreIfPresent + + # Deletes entry for `key` (if it exists) for a given origin's shared storage. + experimental command deleteSharedStorageEntry + parameters + string ownerOrigin + string key + + # Clears all entries for a given origin's shared storage. + experimental command clearSharedStorageEntries + parameters + string ownerOrigin + + # Resets the budget for `ownerOrigin` by clearing all budget withdrawals. + experimental command resetSharedStorageBudget + parameters + string ownerOrigin + + # Enables/disables issuing of sharedStorageAccessed events. + experimental command setSharedStorageTracking + parameters + boolean enable + # A cache's contents have been modified. event cacheStorageContentUpdated parameters # Origin to update. string origin + # Storage key to update. + string storageKey # Name of cache in origin. string cacheName @@ -9202,6 +9431,8 @@ experimental domain Storage parameters # Origin to update. string origin + # Storage key to update. + string storageKey # The origin's IndexedDB object store has been modified. event indexedDBContentUpdated @@ -9231,6 +9462,22 @@ experimental domain Storage string ownerOrigin string name + # Shared storage was accessed by the associated page. + # The following parameters are included in all events. + event sharedStorageAccessed + parameters + # Time of the access. + Network.TimeSinceEpoch accessTime + # Enum value indicating the Shared Storage API method invoked. + SharedStorageAccessType type + # DevTools Frame Token for the primary frame tree's root. + Page.FrameId mainFrameId + # Serialized origin for the context that invoked the Shared Storage API. + string ownerOrigin + # The sub-parameters warapped by `params` are all optional and their + # presence/absence depends on `type`. + SharedStorageAccessParams params + # The SystemInfo domain defines methods and events for querying low-level system information. experimental domain SystemInfo @@ -9358,6 +9605,13 @@ experimental domain SystemInfo # supported. string commandLine + # Returns information about the feature state. + command getFeatureState + parameters + string featureState + returns + boolean featureEnabled + # Returns information about all running processes. command getProcessInfo returns @@ -9499,6 +9753,8 @@ domain Target # Whether to create the target in background or foreground (chrome-only, # false by default). optional boolean background + # Whether to create the target of type "tab". + experimental optional boolean forTab returns # The id of the page opened. TargetID targetId @@ -9803,8 +10059,8 @@ experimental domain Tracing # total size. optional number value - # Contains an bucket of collected trace events. When tracing is stopped collected events will be - # send as a sequence of dataCollected events followed by tracingComplete event. + # Contains a bucket of collected trace events. When tracing is stopped collected events will be + # sent as a sequence of dataCollected events followed by tracingComplete event. event dataCollected parameters array of object value @@ -9943,7 +10199,9 @@ domain Fetch optional string method # If set, overrides the post data in the request. optional binary postData - # If set, overrides the request headers. + # If set, overrides the request headers. Note that the overrides do not + # extend to subsequent redirect hops, if a redirect happens. Another override + # may be applied to a different request produced by a redirect. optional array of HeaderEntry headers # If set, overrides response interception behavior for this request. experimental optional boolean interceptResponse @@ -10304,6 +10562,10 @@ experimental domain WebAuthn # https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension # Defaults to false. optional boolean hasMinPinLength + # If set to true, the authenticator will support the prf extension. + # https://w3c.github.io/webauthn/#prf-extension + # Defaults to false. + optional boolean hasPrf # If set to true, tests of user presence will succeed immediately. # Otherwise, they will not be resolved. Defaults to true. optional boolean automaticPresenceSimulation @@ -10352,6 +10614,20 @@ experimental domain WebAuthn returns AuthenticatorId authenticatorId + # Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present. + command setResponseOverrideBits + parameters + AuthenticatorId authenticatorId + # If isBogusSignature is set, overrides the signature in the authenticator response to be zero. + # Defaults to false. + optional boolean isBogusSignature + # If isBadUV is set, overrides the UV bit in the flags in the authenticator response to + # be zero. Defaults to false. + optional boolean isBadUV + # If isBadUP is set, overrides the UP bit in the flags in the authenticator response to + # be zero. Defaults to false. + optional boolean isBadUP + # Removes the given authenticator. command removeVirtualAuthenticator parameters @@ -10404,6 +10680,18 @@ experimental domain WebAuthn AuthenticatorId authenticatorId boolean enabled + # Triggered when a credential is added to an authenticator. + event credentialAdded + parameters + AuthenticatorId authenticatorId + Credential credential + + # Triggered when a credential is used in a webauthn assertion. + event credentialAsserted + parameters + AuthenticatorId authenticatorId + Credential credential + # This domain allows detailed inspection of media elements experimental domain Media diff --git a/common/devtools/chromium/v108/js_protocol.pdl b/common/devtools/chromium/v111/js_protocol.pdl similarity index 98% rename from common/devtools/chromium/v108/js_protocol.pdl rename to common/devtools/chromium/v111/js_protocol.pdl index b3b97fa11768e..d4102f5c6cef7 100644 --- a/common/devtools/chromium/v108/js_protocol.pdl +++ b/common/devtools/chromium/v111/js_protocol.pdl @@ -458,13 +458,14 @@ domain Debugger # New value for breakpoints active state. boolean active - # Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or - # no exceptions. Initial pause on exceptions state is `none`. + # Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, + # or caught exceptions, no exceptions. Initial pause on exceptions state is `none`. command setPauseOnExceptions parameters # Pause on exceptions mode. enum state none + caught uncaught all @@ -1401,6 +1402,13 @@ domain Runtime optional string objectGroup # Whether to throw an exception if side effect cannot be ruled out during evaluation. experimental optional boolean throwOnSideEffect + # An alternative way to specify the execution context to call function on. + # Compared to contextId that may be reused across processes, this is guaranteed to be + # system-unique, so it can be used to prevent accidental function call + # in context different than intended (e.g. as a result of navigation across process + # boundaries). + # This is mutually exclusive with `executionContextId`. + experimental optional string uniqueContextId # Whether the result should contain `webDriverValue`, serialized according to # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but # resulting `objectId` is still provided. @@ -1733,7 +1741,9 @@ domain Runtime event executionContextDestroyed parameters # Id of the destroyed context - ExecutionContextId executionContextId + deprecated ExecutionContextId executionContextId + # Unique Id of the destroyed context + experimental string executionContextUniqueId # Issued when all executionContexts were cleared in browser event executionContextsCleared diff --git a/dotnet/selenium-dotnet-version.bzl b/dotnet/selenium-dotnet-version.bzl index 118860d46754e..3044d7fb05e48 100644 --- a/dotnet/selenium-dotnet-version.bzl +++ b/dotnet/selenium-dotnet-version.bzl @@ -7,9 +7,9 @@ SUPPORTED_NET_STANDARD_VERSIONS = ["netstandard2.0", "netstandard2.1", "net5.0", SUPPORTED_DEVTOOLS_VERSIONS = [ "v85", - "v108", "v109", "v110", + "v111", ] ASSEMBLY_COMPANY = "Selenium Committers" diff --git a/dotnet/src/webdriver/DevTools/DevToolsDomains.cs b/dotnet/src/webdriver/DevTools/DevToolsDomains.cs index 02a147523332b..3762f86088c11 100644 --- a/dotnet/src/webdriver/DevTools/DevToolsDomains.cs +++ b/dotnet/src/webdriver/DevTools/DevToolsDomains.cs @@ -37,9 +37,9 @@ public abstract class DevToolsDomains // added to this dictionary. private static readonly Dictionary SupportedDevToolsVersions = new Dictionary() { + { 111, typeof(V111.V111Domains) }, { 110, typeof(V110.V110Domains) }, { 109, typeof(V109.V109Domains) }, - { 108, typeof(V108.V108Domains) }, { 85, typeof(V85.V85Domains) } }; diff --git a/dotnet/src/webdriver/DevTools/v108/V108Domains.cs b/dotnet/src/webdriver/DevTools/v111/V111Domains.cs similarity index 79% rename from dotnet/src/webdriver/DevTools/v108/V108Domains.cs rename to dotnet/src/webdriver/DevTools/v111/V111Domains.cs index 07e51f763e83c..4e86bf9782317 100644 --- a/dotnet/src/webdriver/DevTools/v108/V108Domains.cs +++ b/dotnet/src/webdriver/DevTools/v111/V111Domains.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -19,16 +19,16 @@ using System.Collections.Generic; using System.Text; -namespace OpenQA.Selenium.DevTools.V108 +namespace OpenQA.Selenium.DevTools.V111 { /// - /// Class containing the domain implementation for version 108 of the DevTools Protocol. + /// Class containing the domain implementation for version 111 of the DevTools Protocol. /// - public class V108Domains : DevToolsDomains + public class V111Domains : DevToolsDomains { private DevToolsSessionDomains domains; - public V108Domains(DevToolsSession session) + public V111Domains(DevToolsSession session) { this.domains = new DevToolsSessionDomains(session); } @@ -36,7 +36,7 @@ public V108Domains(DevToolsSession session) /// /// Gets the DevTools Protocol version for which this class is valid. /// - public static int DevToolsVersion => 108; + public static int DevToolsVersion => 111; /// /// Gets the version-specific domains for the DevTools session. This value must be cast to a version specific type to be at all useful. @@ -46,21 +46,21 @@ public V108Domains(DevToolsSession session) /// /// Gets the object used for manipulating network information in the browser. /// - public override DevTools.Network Network => new V108Network(domains.Network, domains.Fetch); + public override DevTools.Network Network => new V111Network(domains.Network, domains.Fetch); /// /// Gets the object used for manipulating the browser's JavaScript execution. /// - public override JavaScript JavaScript => new V108JavaScript(domains.Runtime, domains.Page); + public override JavaScript JavaScript => new V111JavaScript(domains.Runtime, domains.Page); /// /// Gets the object used for manipulating DevTools Protocol targets. /// - public override DevTools.Target Target => new V108Target(domains.Target); + public override DevTools.Target Target => new V111Target(domains.Target); /// /// Gets the object used for manipulating the browser's logs. /// - public override DevTools.Log Log => new V108Log(domains.Log); + public override DevTools.Log Log => new V111Log(domains.Log); } } diff --git a/dotnet/src/webdriver/DevTools/v108/V108JavaScript.cs b/dotnet/src/webdriver/DevTools/v111/V111JavaScript.cs similarity index 94% rename from dotnet/src/webdriver/DevTools/v108/V108JavaScript.cs rename to dotnet/src/webdriver/DevTools/v111/V111JavaScript.cs index db21e36b9eda6..813889423d199 100644 --- a/dotnet/src/webdriver/DevTools/v108/V108JavaScript.cs +++ b/dotnet/src/webdriver/DevTools/v111/V111JavaScript.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -18,25 +18,25 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using OpenQA.Selenium.DevTools.V108.Page; -using OpenQA.Selenium.DevTools.V108.Runtime; +using OpenQA.Selenium.DevTools.V111.Page; +using OpenQA.Selenium.DevTools.V111.Runtime; -namespace OpenQA.Selenium.DevTools.V108 +namespace OpenQA.Selenium.DevTools.V111 { /// - /// Class containing the JavaScript implementation for version 108 of the DevTools Protocol. + /// Class containing the JavaScript implementation for version 111 of the DevTools Protocol. /// - public class V108JavaScript : JavaScript + public class V111JavaScript : JavaScript { private RuntimeAdapter runtime; private PageAdapter page; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The DevTools Protocol adapter for the Runtime domain. /// The DevTools Protocol adapter for the Page domain. - public V108JavaScript(RuntimeAdapter runtime, PageAdapter page) + public V111JavaScript(RuntimeAdapter runtime, PageAdapter page) { this.runtime = runtime; this.page = page; diff --git a/dotnet/src/webdriver/DevTools/v108/V108Log.cs b/dotnet/src/webdriver/DevTools/v111/V111Log.cs similarity index 88% rename from dotnet/src/webdriver/DevTools/v108/V108Log.cs rename to dotnet/src/webdriver/DevTools/v111/V111Log.cs index 112a185220700..5ba018cb29b7b 100644 --- a/dotnet/src/webdriver/DevTools/v108/V108Log.cs +++ b/dotnet/src/webdriver/DevTools/v111/V111Log.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -20,22 +20,22 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -using OpenQA.Selenium.DevTools.V108.Log; +using OpenQA.Selenium.DevTools.V111.Log; -namespace OpenQA.Selenium.DevTools.V108 +namespace OpenQA.Selenium.DevTools.V111 { /// - /// Class containing the browser's log as referenced by version 108 of the DevTools Protocol. + /// Class containing the browser's log as referenced by version 111 of the DevTools Protocol. /// - public class V108Log : DevTools.Log + public class V111Log : DevTools.Log { private LogAdapter adapter; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The adapter for the Log domain. - public V108Log(LogAdapter adapter) + public V111Log(LogAdapter adapter) { this.adapter = adapter; this.adapter.EntryAdded += OnAdapterEntryAdded; diff --git a/dotnet/src/webdriver/DevTools/v108/V108Network.cs b/dotnet/src/webdriver/DevTools/v111/V111Network.cs similarity index 93% rename from dotnet/src/webdriver/DevTools/v108/V108Network.cs rename to dotnet/src/webdriver/DevTools/v111/V111Network.cs index 7187aff5cd0b5..2f4ad9ca1f573 100644 --- a/dotnet/src/webdriver/DevTools/v108/V108Network.cs +++ b/dotnet/src/webdriver/DevTools/v111/V111Network.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -20,25 +20,25 @@ using System.Collections.Generic; using System.Text; using System.Threading.Tasks; -using OpenQA.Selenium.DevTools.V108.Fetch; -using OpenQA.Selenium.DevTools.V108.Network; +using OpenQA.Selenium.DevTools.V111.Fetch; +using OpenQA.Selenium.DevTools.V111.Network; -namespace OpenQA.Selenium.DevTools.V108 +namespace OpenQA.Selenium.DevTools.V111 { /// - /// Class providing functionality for manipulating network calls using version 108 of the DevTools Protocol + /// Class providing functionality for manipulating network calls using version 111 of the DevTools Protocol /// - public class V108Network : DevTools.Network + public class V111Network : DevTools.Network { private FetchAdapter fetch; private NetworkAdapter network; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The adapter for the Network domain. /// The adapter for the Fetch domain. - public V108Network(NetworkAdapter network, FetchAdapter fetch) + public V111Network(NetworkAdapter network, FetchAdapter fetch) { this.network = network; this.fetch = fetch; @@ -80,12 +80,12 @@ public override async Task DisableNetwork() /// A task that represents the asynchronous operation. public override async Task EnableFetchForAllPatterns() { - await fetch.Enable(new OpenQA.Selenium.DevTools.V108.Fetch.EnableCommandSettings() + await fetch.Enable(new OpenQA.Selenium.DevTools.V111.Fetch.EnableCommandSettings() { - Patterns = new OpenQA.Selenium.DevTools.V108.Fetch.RequestPattern[] + Patterns = new OpenQA.Selenium.DevTools.V111.Fetch.RequestPattern[] { - new OpenQA.Selenium.DevTools.V108.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Request }, - new OpenQA.Selenium.DevTools.V108.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Response } + new OpenQA.Selenium.DevTools.V111.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Request }, + new OpenQA.Selenium.DevTools.V111.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Response } }, HandleAuthRequests = true }); @@ -208,9 +208,9 @@ public override async Task ContinueWithAuth(string requestId, string userName, s await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() { RequestId = requestId, - AuthChallengeResponse = new V108.Fetch.AuthChallengeResponse() + AuthChallengeResponse = new V111.Fetch.AuthChallengeResponse() { - Response = V108.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials, + Response = V111.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials, Username = userName, Password = password } @@ -227,9 +227,9 @@ public override async Task CancelAuth(string requestId) await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() { RequestId = requestId, - AuthChallengeResponse = new OpenQA.Selenium.DevTools.V108.Fetch.AuthChallengeResponse() + AuthChallengeResponse = new OpenQA.Selenium.DevTools.V111.Fetch.AuthChallengeResponse() { - Response = V108.Fetch.AuthChallengeResponseResponseValues.CancelAuth + Response = V111.Fetch.AuthChallengeResponseResponseValues.CancelAuth } }); } diff --git a/dotnet/src/webdriver/DevTools/v108/V108Target.cs b/dotnet/src/webdriver/DevTools/v111/V111Target.cs similarity index 93% rename from dotnet/src/webdriver/DevTools/v108/V108Target.cs rename to dotnet/src/webdriver/DevTools/v111/V111Target.cs index b9e4147964561..0e34a6fccf97c 100644 --- a/dotnet/src/webdriver/DevTools/v108/V108Target.cs +++ b/dotnet/src/webdriver/DevTools/v111/V111Target.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -21,22 +21,22 @@ using System.Collections.ObjectModel; using System.Text; using System.Threading.Tasks; -using OpenQA.Selenium.DevTools.V108.Target; +using OpenQA.Selenium.DevTools.V111.Target; -namespace OpenQA.Selenium.DevTools.V108 +namespace OpenQA.Selenium.DevTools.V111 { /// - /// Class providing functionality for manipulating targets for version 108 of the DevTools Protocol + /// Class providing functionality for manipulating targets for version 111 of the DevTools Protocol /// - public class V108Target : DevTools.Target + public class V111Target : DevTools.Target { private TargetAdapter adapter; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The adapter for the Target domain. - public V108Target(TargetAdapter adapter) + public V111Target(TargetAdapter adapter) { this.adapter = adapter; adapter.DetachedFromTarget += OnDetachedFromTarget; diff --git a/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd b/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd index ffdcc2f83d591..efc8eb3ce6277 100644 --- a/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd +++ b/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd @@ -27,13 +27,6 @@ if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v85\DevToolsSession popd ) -if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v108\DevToolsSessionDomains.cs" ( - echo Generating CDP code for version 108 - pushd "%1..\..\.." - bazel build //dotnet/src/webdriver/cdp:generate-v108 - popd -) - if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v109\DevToolsSessionDomains.cs" ( echo Generating CDP code for version 109 pushd "%1..\..\.." @@ -47,3 +40,10 @@ if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v110\DevToolsSessio bazel build //dotnet/src/webdriver/cdp:generate-v110 popd ) + +if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v111\DevToolsSessionDomains.cs" ( + echo Generating CDP code for version 111 + pushd "%1..\..\.." + bazel build //dotnet/src/webdriver/cdp:generate-v111 + popd +) diff --git a/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh b/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh index 370a51e35b246..4db7ba0a68e17 100755 --- a/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh +++ b/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh @@ -23,12 +23,6 @@ then bazel build //dotnet/src/webdriver/cdp:generate-v85 fi -if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v108/DevToolsSessionDomains.cs" ]] -then - echo "Generating CDP code for version 108" - bazel build //dotnet/src/webdriver/cdp:generate-v108 -fi - if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v109/DevToolsSessionDomains.cs" ]] then echo "Generating CDP code for version 109" @@ -40,3 +34,9 @@ then echo "Generating CDP code for version 110" bazel build //dotnet/src/webdriver/cdp:generate-v110 fi + +if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v111/DevToolsSessionDomains.cs" ]] +then + echo "Generating CDP code for version 111" + bazel build //dotnet/src/webdriver/cdp:generate-v111 +fi diff --git a/dotnet/test/common/DevTools/DevToolsConsoleTest.cs b/dotnet/test/common/DevTools/DevToolsConsoleTest.cs index 29a990be3f454..36fdb315c4357 100644 --- a/dotnet/test/common/DevTools/DevToolsConsoleTest.cs +++ b/dotnet/test/common/DevTools/DevToolsConsoleTest.cs @@ -18,11 +18,11 @@ public class DevToolsConsoleTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyMessageAdded() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); string consoleMessage = "Hello Selenium"; ManualResetEventSlim sync = new ManualResetEventSlim(false); - EventHandler messageAddedHandler = (sender, e) => + EventHandler messageAddedHandler = (sender, e) => { Assert.That(e.Message.Text, Is.EqualTo(consoleMessage)); sync.Set(); diff --git a/dotnet/test/common/DevTools/DevToolsLogTest.cs b/dotnet/test/common/DevTools/DevToolsLogTest.cs index a2821583c3e15..65440c7892a8f 100644 --- a/dotnet/test/common/DevTools/DevToolsLogTest.cs +++ b/dotnet/test/common/DevTools/DevToolsLogTest.cs @@ -19,12 +19,12 @@ public class DevToolsLogTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyEntryAddedAndClearLog() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); ManualResetEventSlim sync = new ManualResetEventSlim(false); - EventHandler entryAddedHandler = (sender, e) => + EventHandler entryAddedHandler = (sender, e) => { Assert.That(e.Entry.Text.Contains("404")); - Assert.That(e.Entry.Level == V110.Log.LogEntryLevelValues.Error); + Assert.That(e.Entry.Level == V111.Log.LogEntryLevelValues.Error); sync.Set(); }; diff --git a/dotnet/test/common/DevTools/DevToolsNetworkTest.cs b/dotnet/test/common/DevTools/DevToolsNetworkTest.cs index 29c12ae7d473e..8294045fcb157 100644 --- a/dotnet/test/common/DevTools/DevToolsNetworkTest.cs +++ b/dotnet/test/common/DevTools/DevToolsNetworkTest.cs @@ -20,8 +20,8 @@ public class DevToolsNetworkTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public void GetSetDeleteAndClearAllCookies() { - //var domains = session.GetVersionSpecificDomains(); - //await domains.Network.Enable(new V110.Network.EnableCommandSettings()); + //var domains = session.GetVersionSpecificDomains(); + //await domains.Network.Enable(new V111.Network.EnableCommandSettings()); //var allCookieResponse = await domains.Network.GetAllCookies(); //ReadOnlyCollection seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); @@ -36,11 +36,11 @@ public void GetSetDeleteAndClearAllCookies() //seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); //Assert.That(seleniumCookies.Count == 1); - //var cookieResponse = await domains.Network.GetCookies(new V110.Network.GetCookiesCommandSettings()); + //var cookieResponse = await domains.Network.GetCookies(new V111.Network.GetCookiesCommandSettings()); //seleniumCookies = cookieResponse.Cookies.ToSeleniumCookies(); //Assert.That(seleniumCookies.Count == 0); - //await domains.Network.DeleteCookies(new V110.Network.DeleteCookiesCommandSettings() + //await domains.Network.DeleteCookies(new V111.Network.DeleteCookiesCommandSettings() //{ // Name = "name", // Domain = EnvironmentManager.Instance.UrlBuilder.HostName, @@ -67,26 +67,26 @@ public void GetSetDeleteAndClearAllCookies() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SendRequestWithUrlFiltersAndExtraHeadersAndVerifyRequests() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings()); - await domains.Network.SetBlockedURLs(new V110.Network.SetBlockedURLsCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings()); + await domains.Network.SetBlockedURLs(new V111.Network.SetBlockedURLsCommandSettings() { Urls = new string[] { "*://*/*.css" } }); - var additionalHeaders = new V110.Network.Headers(); + var additionalHeaders = new V111.Network.Headers(); additionalHeaders.Add("headerName", "headerValue"); - await domains.Network.SetExtraHTTPHeaders(new V110.Network.SetExtraHTTPHeadersCommandSettings() + await domains.Network.SetExtraHTTPHeaders(new V111.Network.SetExtraHTTPHeadersCommandSettings() { Headers = additionalHeaders }); ManualResetEventSlim loadingFailedSync = new ManualResetEventSlim(false); - EventHandler loadingFailedHandler = (sender, e) => + EventHandler loadingFailedHandler = (sender, e) => { - if (e.Type == V110.Network.ResourceType.Stylesheet) + if (e.Type == V111.Network.ResourceType.Stylesheet) { - Assert.That(e.BlockedReason == V110.Network.BlockedReason.Inspector); + Assert.That(e.BlockedReason == V111.Network.BlockedReason.Inspector); } loadingFailedSync.Set(); @@ -94,7 +94,7 @@ await domains.Network.SetExtraHTTPHeaders(new V110.Network.SetExtraHTTPHeadersCo domains.Network.LoadingFailed += loadingFailedHandler; ManualResetEventSlim requestSentSync = new ManualResetEventSlim(false); - EventHandler requestWillBeSentHandler = (sender, e) => + EventHandler requestWillBeSentHandler = (sender, e) => { Assert.That(e.Request.Headers.ContainsKey("headerName")); Assert.That(e.Request.Headers["headerName"] == "headerValue"); @@ -103,7 +103,7 @@ await domains.Network.SetExtraHTTPHeaders(new V110.Network.SetExtraHTTPHeadersCo domains.Network.RequestWillBeSent += requestWillBeSentHandler; ManualResetEventSlim dataSync = new ManualResetEventSlim(false); - EventHandler dataReceivedHandler = (sender, e) => + EventHandler dataReceivedHandler = (sender, e) => { Assert.That(e.RequestId, Is.Not.Null); dataSync.Set(); @@ -122,23 +122,23 @@ await domains.Network.SetExtraHTTPHeaders(new V110.Network.SetExtraHTTPHeadersCo [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task EmulateNetworkConditionOffline() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings() { MaxTotalBufferSize = 100000000 }); - await domains.Network.EmulateNetworkConditions(new V110.Network.EmulateNetworkConditionsCommandSettings() + await domains.Network.EmulateNetworkConditions(new V111.Network.EmulateNetworkConditionsCommandSettings() { Offline = true, Latency = 100, DownloadThroughput = 1000, UploadThroughput = 2000, - ConnectionType = V110.Network.ConnectionType.Cellular3g + ConnectionType = V111.Network.ConnectionType.Cellular3g }); ManualResetEventSlim loadingFailedSync = new ManualResetEventSlim(false); - EventHandler loadingFailedHandler = (sender, e) => + EventHandler loadingFailedHandler = (sender, e) => { Assert.That(e.ErrorText, Is.EqualTo("net::ERR_INTERNET_DISCONNECTED")); loadingFailedSync.Set(); @@ -164,16 +164,16 @@ await domains.Network.EmulateNetworkConditions(new V110.Network.EmulateNetworkCo [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyRequestReceivedFromCacheAndResponseBody() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); string[] requestIdFromCache = new string[1]; - await domains.Network.Enable(new V110.Network.EnableCommandSettings() + await domains.Network.Enable(new V111.Network.EnableCommandSettings() { MaxResourceBufferSize = 100000000 }); ManualResetEventSlim servedFromCacheSync = new ManualResetEventSlim(false); - EventHandler requestServedFromCacheHandler = (sender, e) => + EventHandler requestServedFromCacheHandler = (sender, e) => { Assert.That(e.RequestId, Is.Not.Null); requestIdFromCache[0] = e.RequestId; @@ -182,7 +182,7 @@ await domains.Network.Enable(new V110.Network.EnableCommandSettings() domains.Network.RequestServedFromCache += requestServedFromCacheHandler; ManualResetEventSlim loadingFinishedSync = new ManualResetEventSlim(false); - EventHandler loadingFinishedHandler = (sender, e) => + EventHandler loadingFinishedHandler = (sender, e) => { Assert.That(e.RequestId, Is.Not.Null); loadingFinishedSync.Set(); @@ -194,7 +194,7 @@ await domains.Network.Enable(new V110.Network.EnableCommandSettings() loadingFinishedSync.Wait(TimeSpan.FromSeconds(5)); servedFromCacheSync.Wait(TimeSpan.FromSeconds(5)); - var responseBody = await domains.Network.GetResponseBody(new V110.Network.GetResponseBodyCommandSettings() + var responseBody = await domains.Network.GetResponseBody(new V111.Network.GetResponseBodyCommandSettings() { RequestId = requestIdFromCache[0] }); @@ -209,16 +209,16 @@ await domains.Network.Enable(new V110.Network.EnableCommandSettings() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifySearchInResponseBody() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); string[] requestIds = new string[1]; - await domains.Network.Enable(new V110.Network.EnableCommandSettings() + await domains.Network.Enable(new V111.Network.EnableCommandSettings() { MaxResourceBufferSize = 100000000 }); ManualResetEventSlim responseSync = new ManualResetEventSlim(false); - EventHandler responseReceivedHandler = (sender, e) => + EventHandler responseReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestIds[0] = e.RequestId; @@ -229,7 +229,7 @@ await domains.Network.Enable(new V110.Network.EnableCommandSettings() driver.Url = simpleTestPage; responseSync.Wait(TimeSpan.FromSeconds(5)); - var searchResponse = await domains.Network.SearchInResponseBody(new V110.Network.SearchInResponseBodyCommandSettings() + var searchResponse = await domains.Network.SearchInResponseBody(new V111.Network.SearchInResponseBodyCommandSettings() { RequestId = requestIds[0], Query = "/", @@ -244,14 +244,14 @@ await domains.Network.Enable(new V110.Network.EnableCommandSettings() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyCacheDisabledAndClearCache() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings() { MaxPostDataSize = 100000000 }); ManualResetEventSlim responseSync = new ManualResetEventSlim(false); - EventHandler responseReceivedHandler = (sender, e) => + EventHandler responseReceivedHandler = (sender, e) => { Assert.That(e.Response.FromDiskCache, Is.False); responseSync.Set(); @@ -261,7 +261,7 @@ await domains.Network.Enable(new V110.Network.EnableCommandSettings() driver.Url = simpleTestPage; responseSync.Wait(TimeSpan.FromSeconds(5)); - await domains.Network.SetCacheDisabled(new V110.Network.SetCacheDisabledCommandSettings() + await domains.Network.SetCacheDisabled(new V111.Network.SetCacheDisabledCommandSettings() { CacheDisabled = true }); @@ -277,16 +277,16 @@ await domains.Network.SetCacheDisabled(new V110.Network.SetCacheDisabledCommandS [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyCertificatesAndOverrideUserAgent() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings()); - await domains.Network.SetUserAgentOverride(new V110.Network.SetUserAgentOverrideCommandSettings() + await domains.Network.SetUserAgentOverride(new V111.Network.SetUserAgentOverrideCommandSettings() { UserAgent = "userAgent" }); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler requestWillBeSentHandler = (sender, e) => + EventHandler requestWillBeSentHandler = (sender, e) => { Assert.That(e.Request.Headers["User-Agent"], Is.EqualTo("userAgent")); requestSync.Set(); @@ -297,7 +297,7 @@ await domains.Network.SetUserAgentOverride(new V110.Network.SetUserAgentOverride driver.Url = origin; requestSync.Wait(TimeSpan.FromSeconds(5)); - var result = await domains.Network.GetCertificate(new V110.Network.GetCertificateCommandSettings() + var result = await domains.Network.GetCertificate(new V111.Network.GetCertificateCommandSettings() { Origin = origin }); @@ -311,10 +311,10 @@ await domains.Network.SetUserAgentOverride(new V110.Network.SetUserAgentOverride [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyResponseReceivedEventAndNetworkDisable() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings()); ManualResetEventSlim responseSync = new ManualResetEventSlim(false); - EventHandler responseReceivedHandler = (sender, e) => + EventHandler responseReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); responseSync.Set(); @@ -332,34 +332,34 @@ public async Task VerifyResponseReceivedEventAndNetworkDisable() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyWebSocketOperations() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings()); - EventHandler webSocketCreatedHandler = (sender, e) => + EventHandler webSocketCreatedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; domains.Network.WebSocketCreated += webSocketCreatedHandler; - EventHandler webSocketFrameReceivedHandler = (sender, e) => + EventHandler webSocketFrameReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; domains.Network.WebSocketFrameReceived += webSocketFrameReceivedHandler; - EventHandlerwebSocketFrameErrorHandler = (sender, e) => + EventHandlerwebSocketFrameErrorHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; domains.Network.WebSocketFrameError += webSocketFrameErrorHandler; - EventHandler webSocketFrameSentHandler = (sender, e) => + EventHandler webSocketFrameSentHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; domains.Network.WebSocketFrameSent += webSocketFrameSentHandler; - EventHandler webSocketClosedHandler = (sender, e) => + EventHandler webSocketClosedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; @@ -374,13 +374,13 @@ public async Task VerifyWebSocketOperations() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyRequestPostData() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings()); string[] requestIds = new string[1]; ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler requestWillBeSentHandler = (sender, e) => + EventHandler requestWillBeSentHandler = (sender, e) => { Assert.That(e, Is.Not.Null); if (string.Compare(e.Request.Method, "post", StringComparison.OrdinalIgnoreCase) == 0) @@ -395,7 +395,7 @@ public async Task VerifyRequestPostData() driver.FindElement(By.XPath("//form/input")).Click(); requestSync.Wait(TimeSpan.FromSeconds(5)); - var response = await domains.Network.GetRequestPostData(new V110.Network.GetRequestPostDataCommandSettings() + var response = await domains.Network.GetRequestPostData(new V111.Network.GetRequestPostDataCommandSettings() { RequestId = requestIds[0] }); @@ -409,9 +409,9 @@ public async Task VerifyRequestPostData() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task ByPassServiceWorker() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings()); - await domains.Network.SetBypassServiceWorker(new V110.Network.SetBypassServiceWorkerCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings()); + await domains.Network.SetBypassServiceWorker(new V111.Network.SetBypassServiceWorkerCommandSettings() { Bypass = true }); @@ -423,11 +423,11 @@ await domains.Network.SetBypassServiceWorker(new V110.Network.SetBypassServiceWo [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyEventSourceMessage() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler eventSourceMessageReceivedHandler = (sender, e) => + EventHandler eventSourceMessageReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestSync.Set(); @@ -445,11 +445,11 @@ public async Task VerifyEventSourceMessage() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifySignedExchangeReceived() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler signedExchangeReceivedHandler = (sender, e) => + EventHandler signedExchangeReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestSync.Set(); @@ -466,11 +466,11 @@ public async Task VerifySignedExchangeReceived() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyResourceChangedPriority() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler resourceChangedPriorityHandler = (sender, e) => + EventHandler resourceChangedPriorityHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestSync.Set(); @@ -487,13 +487,13 @@ public async Task VerifyResourceChangedPriority() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task InterceptRequestAndContinue() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V110.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V111.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler requestInterceptedHandler = (async (sender, e) => + EventHandler requestInterceptedHandler = (async (sender, e) => { - await domains.Network.ContinueInterceptedRequest(new V110.Network.ContinueInterceptedRequestCommandSettings() + await domains.Network.ContinueInterceptedRequest(new V111.Network.ContinueInterceptedRequestCommandSettings() { InterceptionId = e.InterceptionId }); @@ -501,16 +501,16 @@ await domains.Network.ContinueInterceptedRequest(new V110.Network.ContinueInterc }); domains.Network.RequestIntercepted += requestInterceptedHandler; - var pattern = new V110.Network.RequestPattern() + var pattern = new V111.Network.RequestPattern() { UrlPattern = "*.css", - ResourceType = V110.Network.ResourceType.Stylesheet, - InterceptionStage = V110.Network.InterceptionStage.HeadersReceived + ResourceType = V111.Network.ResourceType.Stylesheet, + InterceptionStage = V111.Network.InterceptionStage.HeadersReceived }; - await domains.Network.SetRequestInterception(new V110.Network.SetRequestInterceptionCommandSettings() + await domains.Network.SetRequestInterception(new V111.Network.SetRequestInterceptionCommandSettings() { - Patterns = new V110.Network.RequestPattern[] { pattern } + Patterns = new V111.Network.RequestPattern[] { pattern } }); driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("js/skins/lightgray/content.min.css"); diff --git a/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs b/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs index e00f05b4989f0..8528f9c531610 100644 --- a/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs +++ b/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs @@ -12,8 +12,8 @@ public class DevToolsPerformanceTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task EnableAndDisablePerformance() { - var domains = session.GetVersionSpecificDomains(); - await domains.Performance.Enable(new V110.Performance.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.Enable(new V111.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; await domains.Performance.Disable(); } @@ -24,7 +24,7 @@ public async Task EnableAndDisablePerformance() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task DisablePerformance() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Performance.Disable(); driver.Url = simpleTestPage; await domains.Performance.Disable(); @@ -36,13 +36,13 @@ public async Task DisablePerformance() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SetTimeDomainTimeTickPerformance() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Performance.Disable(); - await domains.Performance.SetTimeDomain(new V110.Performance.SetTimeDomainCommandSettings() + await domains.Performance.SetTimeDomain(new V111.Performance.SetTimeDomainCommandSettings() { TimeDomain = "timeTicks" }); - await domains.Performance.Enable(new V110.Performance.EnableCommandSettings()); + await domains.Performance.Enable(new V111.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; await domains.Performance.Disable(); } @@ -54,13 +54,13 @@ await domains.Performance.SetTimeDomain(new V110.Performance.SetTimeDomainComman [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SetTimeDomainsThreadTicksPerformance() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Performance.Disable(); - await domains.Performance.SetTimeDomain(new V110.Performance.SetTimeDomainCommandSettings() + await domains.Performance.SetTimeDomain(new V111.Performance.SetTimeDomainCommandSettings() { TimeDomain = "threadTicks" }); - await domains.Performance.Enable(new V110.Performance.EnableCommandSettings()); + await domains.Performance.Enable(new V111.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; await domains.Performance.Disable(); } @@ -71,12 +71,12 @@ await domains.Performance.SetTimeDomain(new V110.Performance.SetTimeDomainComman [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetMetricsByTimeTicks() { - var domains = session.GetVersionSpecificDomains(); - await domains.Performance.SetTimeDomain(new V110.Performance.SetTimeDomainCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.SetTimeDomain(new V111.Performance.SetTimeDomainCommandSettings() { TimeDomain = "timeTicks" }); - await domains.Performance.Enable(new V110.Performance.EnableCommandSettings()); + await domains.Performance.Enable(new V111.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; var response = await domains.Performance.GetMetrics(); var metrics = response.Metrics; @@ -92,12 +92,12 @@ await domains.Performance.SetTimeDomain(new V110.Performance.SetTimeDomainComman [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetMetricsByThreadTicks() { - var domains = session.GetVersionSpecificDomains(); - await domains.Performance.SetTimeDomain(new V110.Performance.SetTimeDomainCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.SetTimeDomain(new V111.Performance.SetTimeDomainCommandSettings() { TimeDomain = "threadTicks" }); - await domains.Performance.Enable(new V110.Performance.EnableCommandSettings()); + await domains.Performance.Enable(new V111.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; var response = await domains.Performance.GetMetrics(); var metrics = response.Metrics; diff --git a/dotnet/test/common/DevTools/DevToolsProfilerTest.cs b/dotnet/test/common/DevTools/DevToolsProfilerTest.cs index 5512243e10efb..b3b391871d1a7 100644 --- a/dotnet/test/common/DevTools/DevToolsProfilerTest.cs +++ b/dotnet/test/common/DevTools/DevToolsProfilerTest.cs @@ -17,7 +17,7 @@ public class DevToolsProfilerTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SimpleStartStopAndGetProfilerTest() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Profiler.Enable(); await domains.Profiler.Start(); var response = await domains.Profiler.Stop(); @@ -32,10 +32,10 @@ public async Task SimpleStartStopAndGetProfilerTest() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SampleGetBestEffortProfilerTest() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Profiler.Enable(); driver.Url = simpleTestPage; - await domains.Profiler.SetSamplingInterval(new V110.Profiler.SetSamplingIntervalCommandSettings() + await domains.Profiler.SetSamplingInterval(new V111.Profiler.SetSamplingIntervalCommandSettings() { Interval = 30 }); @@ -53,10 +53,10 @@ await domains.Profiler.SetSamplingInterval(new V110.Profiler.SetSamplingInterval [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SampleSetStartPreciseCoverageTest() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Profiler.Enable(); driver.Url = simpleTestPage; - await domains.Profiler.StartPreciseCoverage(new V110.Profiler.StartPreciseCoverageCommandSettings() + await domains.Profiler.StartPreciseCoverage(new V111.Profiler.StartPreciseCoverageCommandSettings() { CallCount = true, Detailed = true @@ -78,11 +78,11 @@ await domains.Profiler.StartPreciseCoverage(new V110.Profiler.StartPreciseCovera [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SampleProfileEvents() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Profiler.Enable(); driver.Url = simpleTestPage; ManualResetEventSlim startSync = new ManualResetEventSlim(false); - EventHandler consoleProfileStartedHandler = (sender, e) => + EventHandler consoleProfileStartedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); startSync.Set(); @@ -94,7 +94,7 @@ public async Task SampleProfileEvents() driver.Navigate().Refresh(); ManualResetEventSlim finishSync = new ManualResetEventSlim(false); - EventHandler consoleProfileFinishedHandler = (sender, e) => + EventHandler consoleProfileFinishedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); finishSync.Set(); @@ -109,7 +109,7 @@ public async Task SampleProfileEvents() await domains.Profiler.Disable(); } - private void ValidateProfile(V110.Profiler.Profile profiler) + private void ValidateProfile(V111.Profiler.Profile profiler) { Assert.That(profiler, Is.Not.Null); Assert.That(profiler.Nodes, Is.Not.Null); diff --git a/dotnet/test/common/DevTools/DevToolsSecurityTest.cs b/dotnet/test/common/DevTools/DevToolsSecurityTest.cs index b902ccd4e2414..592029133b929 100644 --- a/dotnet/test/common/DevTools/DevToolsSecurityTest.cs +++ b/dotnet/test/common/DevTools/DevToolsSecurityTest.cs @@ -18,17 +18,17 @@ public class DevToolsSecurityTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task LoadInsecureWebsite() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Security.Enable(); - await domains.Security.SetIgnoreCertificateErrors(new V110.Security.SetIgnoreCertificateErrorsCommandSettings() + await domains.Security.SetIgnoreCertificateErrors(new V111.Security.SetIgnoreCertificateErrorsCommandSettings() { Ignore = false }); string summary = null; ManualResetEventSlim sync = new ManualResetEventSlim(false); - EventHandler securityStateChangedHandler = (sender, e) => + EventHandler securityStateChangedHandler = (sender, e) => { summary = e.Summary; sync.Set(); @@ -50,10 +50,10 @@ await domains.Security.SetIgnoreCertificateErrors(new V110.Security.SetIgnoreCer [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task LoadSecureWebsite() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Security.Enable(); - await domains.Security.SetIgnoreCertificateErrors(new V110.Security.SetIgnoreCertificateErrorsCommandSettings() + await domains.Security.SetIgnoreCertificateErrors(new V111.Security.SetIgnoreCertificateErrorsCommandSettings() { Ignore = true }); diff --git a/dotnet/test/common/DevTools/DevToolsTargetTest.cs b/dotnet/test/common/DevTools/DevToolsTargetTest.cs index b8ca196f5089b..5f25465502c95 100644 --- a/dotnet/test/common/DevTools/DevToolsTargetTest.cs +++ b/dotnet/test/common/DevTools/DevToolsTargetTest.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; using NUnit.Framework; -using OpenQA.Selenium.DevTools.V110.Target; +using OpenQA.Selenium.DevTools.V111.Target; using OpenQA.Selenium.Environment; namespace OpenQA.Selenium.DevTools @@ -18,24 +18,24 @@ public class DevToolsTargetTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetTargetActivateAndAttach() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsConsoleTest.html"); var response = await domains.Target.GetTargets(new GetTargetsCommandSettings()); - V110.Target.TargetInfo[] allTargets = response.TargetInfos; - foreach (V110.Target.TargetInfo targetInfo in allTargets) + V111.Target.TargetInfo[] allTargets = response.TargetInfos; + foreach (V111.Target.TargetInfo targetInfo in allTargets) { ValidateTarget(targetInfo); - await domains.Target.ActivateTarget(new V110.Target.ActivateTargetCommandSettings() + await domains.Target.ActivateTarget(new V111.Target.ActivateTargetCommandSettings() { TargetId = targetInfo.TargetId }); - var attachResponse = await domains.Target.AttachToTarget(new V110.Target.AttachToTargetCommandSettings() + var attachResponse = await domains.Target.AttachToTarget(new V111.Target.AttachToTargetCommandSettings() { TargetId = targetInfo.TargetId, Flatten = true }); ValidateSession(attachResponse.SessionId); - var getInfoResponse = await domains.Target.GetTargetInfo(new V110.Target.GetTargetInfoCommandSettings() + var getInfoResponse = await domains.Target.GetTargetInfo(new V111.Target.GetTargetInfoCommandSettings() { TargetId = targetInfo.TargetId }); @@ -49,10 +49,10 @@ await domains.Target.ActivateTarget(new V110.Target.ActivateTargetCommandSetting [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetTargetAndSendMessageToTarget() { - var domains = session.GetVersionSpecificDomains(); - V110.Target.TargetInfo[] allTargets = null; + var domains = session.GetVersionSpecificDomains(); + V111.Target.TargetInfo[] allTargets = null; string sessionId = null; - V110.Target.TargetInfo targetInfo = null; + V111.Target.TargetInfo targetInfo = null; driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsConsoleTest.html"); ManualResetEventSlim sync = new ManualResetEventSlim(false); domains.Target.ReceivedMessageFromTarget += (sender, e) => @@ -65,19 +65,19 @@ public async Task GetTargetAndSendMessageToTarget() ValidateTargetsInfos(allTargets); ValidateTarget(allTargets[0]); targetInfo = allTargets[0]; - await domains.Target.ActivateTarget(new V110.Target.ActivateTargetCommandSettings() + await domains.Target.ActivateTarget(new V111.Target.ActivateTargetCommandSettings() { TargetId = targetInfo.TargetId }); - var attachResponse = await domains.Target.AttachToTarget(new V110.Target.AttachToTargetCommandSettings() + var attachResponse = await domains.Target.AttachToTarget(new V111.Target.AttachToTargetCommandSettings() { TargetId = targetInfo.TargetId, Flatten = false }); sessionId = attachResponse.SessionId; ValidateSession(sessionId); - await domains.Target.SendMessageToTarget(new V110.Target.SendMessageToTargetCommandSettings() + await domains.Target.SendMessageToTarget(new V111.Target.SendMessageToTargetCommandSettings() { Message = "{\"id\":" + id + ",\"method\":\"Page.bringToFront\"}", SessionId = sessionId, @@ -92,32 +92,32 @@ await domains.Target.SendMessageToTarget(new V110.Target.SendMessageToTargetComm [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task CreateAndContentLifeCycle() { - var domains = session.GetVersionSpecificDomains(); - EventHandler targetCreatedHandler = (sender, e) => + var domains = session.GetVersionSpecificDomains(); + EventHandler targetCreatedHandler = (sender, e) => { ValidateTargetInfo(e.TargetInfo); }; domains.Target.TargetCreated += targetCreatedHandler; - EventHandler targetCrashedHandler = (sender, e) => + EventHandler targetCrashedHandler = (sender, e) => { ValidateTargetCrashed(e); }; domains.Target.TargetCrashed += targetCrashedHandler; - EventHandler targetDestroyedHandler = (sender, e) => + EventHandler targetDestroyedHandler = (sender, e) => { ValidateTargetId(e.TargetId); }; domains.Target.TargetDestroyed += targetDestroyedHandler; - EventHandler targetInfoChangedHandler = (sender, e) => + EventHandler targetInfoChangedHandler = (sender, e) => { ValidateTargetInfo(e.TargetInfo); }; domains.Target.TargetInfoChanged += targetInfoChangedHandler; - var response = await domains.Target.CreateTarget(new V110.Target.CreateTargetCommandSettings() + var response = await domains.Target.CreateTarget(new V111.Target.CreateTargetCommandSettings() { Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsConsoleTest.html"), NewWindow = true, @@ -125,12 +125,12 @@ public async Task CreateAndContentLifeCycle() }); ValidateTargetId(response.TargetId); - await domains.Target.SetDiscoverTargets(new V110.Target.SetDiscoverTargetsCommandSettings() + await domains.Target.SetDiscoverTargets(new V111.Target.SetDiscoverTargetsCommandSettings() { Discover = true }); - var closeResponse = await domains.Target.CloseTarget(new V110.Target.CloseTargetCommandSettings() + var closeResponse = await domains.Target.CloseTarget(new V111.Target.CloseTargetCommandSettings() { TargetId = response.TargetId }); @@ -139,7 +139,7 @@ await domains.Target.SetDiscoverTargets(new V110.Target.SetDiscoverTargetsComman Assert.That(closeResponse.Success, Is.True); } - private void ValidateTargetCrashed(V110.Target.TargetCrashedEventArgs targetCrashed) + private void ValidateTargetCrashed(V111.Target.TargetCrashedEventArgs targetCrashed) { Assert.That(targetCrashed, Is.Not.Null); Assert.That(targetCrashed.ErrorCode, Is.Not.Null); @@ -152,7 +152,7 @@ private void ValidateTargetId(string targetId) Assert.That(targetId, Is.Not.Null); } - private void ValidateMessage(V110.Target.ReceivedMessageFromTargetEventArgs messageFromTarget) + private void ValidateMessage(V111.Target.ReceivedMessageFromTargetEventArgs messageFromTarget) { Assert.That(messageFromTarget, Is.Not.Null); Assert.That(messageFromTarget.Message, Is.Not.Null); @@ -160,7 +160,7 @@ private void ValidateMessage(V110.Target.ReceivedMessageFromTargetEventArgs mess Assert.That(messageFromTarget.Message, Is.EqualTo("{\"id\":" + id + ",\"result\":{}}")); } - private void ValidateTargetInfo(V110.Target.TargetInfo targetInfo) + private void ValidateTargetInfo(V111.Target.TargetInfo targetInfo) { Assert.That(targetInfo, Is.Not.Null); Assert.That(targetInfo.TargetId, Is.Not.Null); @@ -169,13 +169,13 @@ private void ValidateTargetInfo(V110.Target.TargetInfo targetInfo) Assert.That(targetInfo.Url, Is.Not.Null); } - private void ValidateTargetsInfos(V110.Target.TargetInfo[] targets) + private void ValidateTargetsInfos(V111.Target.TargetInfo[] targets) { Assert.That(targets, Is.Not.Null); Assert.That(targets.Length, Is.GreaterThan(0)); } - private void ValidateTarget(V110.Target.TargetInfo targetInfo) + private void ValidateTarget(V111.Target.TargetInfo targetInfo) { Assert.That(targetInfo, Is.Not.Null); Assert.That(targetInfo.TargetId, Is.Not.Null); diff --git a/java/src/org/openqa/selenium/devtools/v108/BUILD.bazel b/java/src/org/openqa/selenium/devtools/v111/BUILD.bazel similarity index 98% rename from java/src/org/openqa/selenium/devtools/v108/BUILD.bazel rename to java/src/org/openqa/selenium/devtools/v111/BUILD.bazel index 1e5492eecb0a0..69d9d08de7e61 100644 --- a/java/src/org/openqa/selenium/devtools/v108/BUILD.bazel +++ b/java/src/org/openqa/selenium/devtools/v111/BUILD.bazel @@ -3,7 +3,7 @@ load("//common:defs.bzl", "copy_file") load("//java:defs.bzl", "java_export", "java_library") load("//java:version.bzl", "SE_VERSION") -cdp_version = "v108" +cdp_version = "v111" java_export( name = cdp_version, diff --git a/java/src/org/openqa/selenium/devtools/v108/V108CdpInfo.java b/java/src/org/openqa/selenium/devtools/v111/v111CdpInfo.java similarity index 86% rename from java/src/org/openqa/selenium/devtools/v108/V108CdpInfo.java rename to java/src/org/openqa/selenium/devtools/v111/v111CdpInfo.java index 582047e7b0e5a..a1114fe33fcfb 100644 --- a/java/src/org/openqa/selenium/devtools/v108/V108CdpInfo.java +++ b/java/src/org/openqa/selenium/devtools/v111/v111CdpInfo.java @@ -15,15 +15,16 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v108; +package org.openqa.selenium.devtools.v111; import com.google.auto.service.AutoService; + import org.openqa.selenium.devtools.CdpInfo; @AutoService(CdpInfo.class) -public class V108CdpInfo extends CdpInfo { +public class v111CdpInfo extends CdpInfo { - public V108CdpInfo() { - super(108, V108Domains::new); + public v111CdpInfo() { + super(111, v111Domains::new); } } diff --git a/java/src/org/openqa/selenium/devtools/v108/V108Domains.java b/java/src/org/openqa/selenium/devtools/v111/v111Domains.java similarity index 77% rename from java/src/org/openqa/selenium/devtools/v108/V108Domains.java rename to java/src/org/openqa/selenium/devtools/v111/v111Domains.java index be5e1568ba73b..85975137d1787 100644 --- a/java/src/org/openqa/selenium/devtools/v108/V108Domains.java +++ b/java/src/org/openqa/selenium/devtools/v111/v111Domains.java @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v108; +package org.openqa.selenium.devtools.v111; import org.openqa.selenium.devtools.DevTools; import org.openqa.selenium.devtools.idealized.Domains; @@ -26,21 +26,21 @@ import org.openqa.selenium.devtools.idealized.target.Target; import org.openqa.selenium.internal.Require; -public class V108Domains implements Domains { +public class v111Domains implements Domains { - private final V108Javascript js; - private final V108Events events; - private final V108Log log; - private final V108Network network; - private final V108Target target; + private final v111Javascript js; + private final v111Events events; + private final v111Log log; + private final v111Network network; + private final v111Target target; - public V108Domains(DevTools devtools) { + public v111Domains(DevTools devtools) { Require.nonNull("DevTools", devtools); - events = new V108Events(devtools); - js = new V108Javascript(devtools); - log = new V108Log(); - network = new V108Network(devtools); - target = new V108Target(); + events = new v111Events(devtools); + js = new v111Javascript(devtools); + log = new v111Log(); + network = new v111Network(devtools); + target = new v111Target(); } @Override diff --git a/java/src/org/openqa/selenium/devtools/v108/V108Events.java b/java/src/org/openqa/selenium/devtools/v111/v111Events.java similarity index 86% rename from java/src/org/openqa/selenium/devtools/v108/V108Events.java rename to java/src/org/openqa/selenium/devtools/v111/v111Events.java index 0ace9e07a352d..2a25f8c0c059e 100644 --- a/java/src/org/openqa/selenium/devtools/v108/V108Events.java +++ b/java/src/org/openqa/selenium/devtools/v111/v111Events.java @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v108; +package org.openqa.selenium.devtools.v111; import com.google.common.collect.ImmutableList; @@ -26,19 +26,19 @@ import org.openqa.selenium.devtools.events.ConsoleEvent; import org.openqa.selenium.devtools.idealized.Events; import org.openqa.selenium.devtools.idealized.runtime.model.RemoteObject; -import org.openqa.selenium.devtools.v108.runtime.Runtime; -import org.openqa.selenium.devtools.v108.runtime.model.ConsoleAPICalled; -import org.openqa.selenium.devtools.v108.runtime.model.ExceptionDetails; -import org.openqa.selenium.devtools.v108.runtime.model.ExceptionThrown; -import org.openqa.selenium.devtools.v108.runtime.model.StackTrace; +import org.openqa.selenium.devtools.v111.runtime.Runtime; +import org.openqa.selenium.devtools.v111.runtime.model.ConsoleAPICalled; +import org.openqa.selenium.devtools.v111.runtime.model.ExceptionDetails; +import org.openqa.selenium.devtools.v111.runtime.model.ExceptionThrown; +import org.openqa.selenium.devtools.v111.runtime.model.StackTrace; import java.time.Instant; import java.util.List; import java.util.Optional; -public class V108Events extends Events { +public class v111Events extends Events { - public V108Events(DevTools devtools) { + public v111Events(DevTools devtools) { super(devtools); } @@ -83,7 +83,7 @@ protected ConsoleEvent toConsoleEvent(ConsoleAPICalled event) { protected JavascriptException toJsException(ExceptionThrown event) { ExceptionDetails details = event.getExceptionDetails(); Optional maybeTrace = details.getStackTrace(); - Optional + Optional maybeException = details.getException(); String message = maybeException diff --git a/java/src/org/openqa/selenium/devtools/v108/V108Javascript.java b/java/src/org/openqa/selenium/devtools/v111/v111Javascript.java similarity index 85% rename from java/src/org/openqa/selenium/devtools/v108/V108Javascript.java rename to java/src/org/openqa/selenium/devtools/v111/v111Javascript.java index 4d6472f9e60ea..1044b4d76c6b0 100644 --- a/java/src/org/openqa/selenium/devtools/v108/V108Javascript.java +++ b/java/src/org/openqa/selenium/devtools/v111/v111Javascript.java @@ -15,22 +15,22 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v108; +package org.openqa.selenium.devtools.v111; import org.openqa.selenium.devtools.Command; import org.openqa.selenium.devtools.DevTools; import org.openqa.selenium.devtools.Event; import org.openqa.selenium.devtools.idealized.Javascript; -import org.openqa.selenium.devtools.v108.page.Page; -import org.openqa.selenium.devtools.v108.page.model.ScriptIdentifier; -import org.openqa.selenium.devtools.v108.runtime.Runtime; -import org.openqa.selenium.devtools.v108.runtime.model.BindingCalled; +import org.openqa.selenium.devtools.v111.page.Page; +import org.openqa.selenium.devtools.v111.page.model.ScriptIdentifier; +import org.openqa.selenium.devtools.v111.runtime.Runtime; +import org.openqa.selenium.devtools.v111.runtime.model.BindingCalled; import java.util.Optional; -public class V108Javascript extends Javascript { +public class v111Javascript extends Javascript { - public V108Javascript(DevTools devtools) { + public v111Javascript(DevTools devtools) { super(devtools); } diff --git a/java/src/org/openqa/selenium/devtools/v108/V108Log.java b/java/src/org/openqa/selenium/devtools/v111/v111Log.java similarity index 89% rename from java/src/org/openqa/selenium/devtools/v108/V108Log.java rename to java/src/org/openqa/selenium/devtools/v111/v111Log.java index 6dcad87d678ba..31781b2f734cb 100644 --- a/java/src/org/openqa/selenium/devtools/v108/V108Log.java +++ b/java/src/org/openqa/selenium/devtools/v111/v111Log.java @@ -15,20 +15,20 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v108; +package org.openqa.selenium.devtools.v111; import org.openqa.selenium.devtools.Command; import org.openqa.selenium.devtools.ConverterFunctions; import org.openqa.selenium.devtools.Event; -import org.openqa.selenium.devtools.v108.log.Log; -import org.openqa.selenium.devtools.v108.log.model.LogEntry; -import org.openqa.selenium.devtools.v108.runtime.model.Timestamp; +import org.openqa.selenium.devtools.v111.log.Log; +import org.openqa.selenium.devtools.v111.log.model.LogEntry; +import org.openqa.selenium.devtools.v111.runtime.model.Timestamp; import org.openqa.selenium.json.JsonInput; import java.util.function.Function; import java.util.logging.Level; -public class V108Log implements org.openqa.selenium.devtools.idealized.log.Log { +public class v111Log implements org.openqa.selenium.devtools.idealized.log.Log { @Override public Command enable() { diff --git a/java/src/org/openqa/selenium/devtools/v108/V108Network.java b/java/src/org/openqa/selenium/devtools/v111/v111Network.java similarity index 89% rename from java/src/org/openqa/selenium/devtools/v108/V108Network.java rename to java/src/org/openqa/selenium/devtools/v111/v111Network.java index 21afebf9afad2..72aacafb6e64a 100644 --- a/java/src/org/openqa/selenium/devtools/v108/V108Network.java +++ b/java/src/org/openqa/selenium/devtools/v111/v111Network.java @@ -15,24 +15,25 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v108; +package org.openqa.selenium.devtools.v111; import com.google.common.collect.ImmutableList; import com.google.common.io.ByteStreams; + import org.openqa.selenium.UsernameAndPassword; import org.openqa.selenium.devtools.Command; import org.openqa.selenium.devtools.DevTools; import org.openqa.selenium.devtools.DevToolsException; import org.openqa.selenium.devtools.Event; import org.openqa.selenium.devtools.idealized.Network; -import org.openqa.selenium.devtools.v108.fetch.Fetch; -import org.openqa.selenium.devtools.v108.fetch.model.AuthChallengeResponse; -import org.openqa.selenium.devtools.v108.fetch.model.AuthRequired; -import org.openqa.selenium.devtools.v108.fetch.model.HeaderEntry; -import org.openqa.selenium.devtools.v108.fetch.model.RequestPattern; -import org.openqa.selenium.devtools.v108.fetch.model.RequestPaused; -import org.openqa.selenium.devtools.v108.fetch.model.RequestStage; -import org.openqa.selenium.devtools.v108.network.model.Request; +import org.openqa.selenium.devtools.v111.fetch.Fetch; +import org.openqa.selenium.devtools.v111.fetch.model.AuthChallengeResponse; +import org.openqa.selenium.devtools.v111.fetch.model.AuthRequired; +import org.openqa.selenium.devtools.v111.fetch.model.HeaderEntry; +import org.openqa.selenium.devtools.v111.fetch.model.RequestPattern; +import org.openqa.selenium.devtools.v111.fetch.model.RequestPaused; +import org.openqa.selenium.devtools.v111.fetch.model.RequestStage; +import org.openqa.selenium.devtools.v111.network.model.Request; import org.openqa.selenium.internal.Either; import org.openqa.selenium.remote.http.HttpRequest; import org.openqa.selenium.remote.http.HttpResponse; @@ -50,28 +51,28 @@ import static java.net.HttpURLConnection.HTTP_OK; -public class V108Network extends Network { +public class v111Network extends Network { - private static final Logger LOG = Logger.getLogger(V108Network.class.getName()); + private static final Logger LOG = Logger.getLogger(v111Network.class.getName()); - public V108Network(DevTools devTools) { + public v111Network(DevTools devTools) { super(devTools); } @Override protected Command setUserAgentOverride(UserAgent userAgent) { - return org.openqa.selenium.devtools.v108.network.Network.setUserAgentOverride( + return org.openqa.selenium.devtools.v111.network.Network.setUserAgentOverride( userAgent.userAgent(), userAgent.acceptLanguage(), userAgent.platform(), Optional.empty()); } @Override protected Command enableNetworkCaching() { - return org.openqa.selenium.devtools.v108.network.Network.setCacheDisabled(false); + return org.openqa.selenium.devtools.v111.network.Network.setCacheDisabled(false); } @Override protected Command disableNetworkCaching() { - return org.openqa.selenium.devtools.v108.network.Network.setCacheDisabled(true); + return org.openqa.selenium.devtools.v111.network.Network.setCacheDisabled(true); } @Override diff --git a/java/src/org/openqa/selenium/devtools/v108/V108Target.java b/java/src/org/openqa/selenium/devtools/v111/v111Target.java similarity index 83% rename from java/src/org/openqa/selenium/devtools/v108/V108Target.java rename to java/src/org/openqa/selenium/devtools/v111/v111Target.java index 322c35503cc34..3116ac6def748 100644 --- a/java/src/org/openqa/selenium/devtools/v108/V108Target.java +++ b/java/src/org/openqa/selenium/devtools/v111/v111Target.java @@ -15,18 +15,19 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v108; +package org.openqa.selenium.devtools.v111; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; + import org.openqa.selenium.devtools.Command; import org.openqa.selenium.devtools.ConverterFunctions; import org.openqa.selenium.devtools.Event; import org.openqa.selenium.devtools.idealized.browser.model.BrowserContextID; import org.openqa.selenium.devtools.idealized.target.model.SessionID; import org.openqa.selenium.devtools.idealized.target.model.TargetID; -import org.openqa.selenium.devtools.v108.target.Target; -import org.openqa.selenium.devtools.v108.target.model.TargetInfo; +import org.openqa.selenium.devtools.v111.target.Target; +import org.openqa.selenium.devtools.v111.target.model.TargetInfo; import org.openqa.selenium.json.JsonInput; import org.openqa.selenium.json.TypeToken; @@ -34,16 +35,16 @@ import java.util.Optional; import java.util.function.Function; -public class V108Target implements org.openqa.selenium.devtools.idealized.target.Target { +public class v111Target implements org.openqa.selenium.devtools.idealized.target.Target { @Override public Command detachFromTarget(Optional sessionId, Optional targetId) { return Target.detachFromTarget( sessionId.map( - id -> new org.openqa.selenium.devtools.v108.target.model.SessionID(id.toString())), + id -> new org.openqa.selenium.devtools.v111.target.model.SessionID(id.toString())), targetId.map( - id -> new org.openqa.selenium.devtools.v108.target.model.TargetID(id.toString()))); + id -> new org.openqa.selenium.devtools.v111.target.model.TargetID(id.toString()))); } @Override @@ -74,18 +75,18 @@ public Command attachToTarget(TargetID targetId) { - Function mapper = + Function mapper = ConverterFunctions.map("sessionId", - org.openqa.selenium.devtools.v108.target.model.SessionID.class); + org.openqa.selenium.devtools.v111.target.model.SessionID.class); return new Command<>( "Target.attachToTarget", ImmutableMap.of( "targetId", - new org.openqa.selenium.devtools.v108.target.model.TargetID(targetId.toString()), + new org.openqa.selenium.devtools.v111.target.model.TargetID(targetId.toString()), "flatten", true), input -> { - org.openqa.selenium.devtools.v108.target.model.SessionID id = mapper.apply(input); + org.openqa.selenium.devtools.v111.target.model.SessionID id = mapper.apply(input); return new SessionID(id.toString()); }); } @@ -100,9 +101,9 @@ public Event detached() { return new Event<>( "Target.detachedFromTarget", input -> { - Function converter = + Function converter = ConverterFunctions.map("targetId", - org.openqa.selenium.devtools.v108.target.model.TargetID.class); + org.openqa.selenium.devtools.v111.target.model.TargetID.class); return new TargetID(converter.apply(input).toString()); } ); diff --git a/java/src/org/openqa/selenium/devtools/versions.bzl b/java/src/org/openqa/selenium/devtools/versions.bzl index 1155a13c6fd43..b1487f698d75f 100644 --- a/java/src/org/openqa/selenium/devtools/versions.bzl +++ b/java/src/org/openqa/selenium/devtools/versions.bzl @@ -1,8 +1,8 @@ CDP_VERSIONS = [ "v85", # Required by Firefox - "v108", "v109", "v110", + "v111", ] CDP_DEPS = ["//java/src/org/openqa/selenium/devtools/%s" % v for v in CDP_VERSIONS] diff --git a/javascript/node/selenium-webdriver/BUILD.bazel b/javascript/node/selenium-webdriver/BUILD.bazel index fc8ef24aa603f..8cbce57ae3ea8 100644 --- a/javascript/node/selenium-webdriver/BUILD.bazel +++ b/javascript/node/selenium-webdriver/BUILD.bazel @@ -4,9 +4,9 @@ load("//common:defs.bzl", "copy_file") BROWSER_VERSIONS = [ "v85", - "v108", "v109", "v110", + "v111", ] SRC_FILES = [ diff --git a/py/BUILD.bazel b/py/BUILD.bazel index 415434ecb40a5..6dcb543173912 100644 --- a/py/BUILD.bazel +++ b/py/BUILD.bazel @@ -20,9 +20,9 @@ SE_VERSION = "4.8.2" BROWSER_VERSIONS = [ "v85", - "v108", "v109", "v110", + "v111", ] TEST_DEPS = [ diff --git a/rb/lib/selenium/devtools/BUILD.bazel b/rb/lib/selenium/devtools/BUILD.bazel index a25928872fa1f..cc0ae1d5f8c93 100644 --- a/rb/lib/selenium/devtools/BUILD.bazel +++ b/rb/lib/selenium/devtools/BUILD.bazel @@ -4,9 +4,9 @@ package(default_visibility = ["//rb:__subpackages__"]) CDP_VERSIONS = [ "v85", - "v108", "v109", "v110", + "v111", ] rb_library( diff --git a/rb/lib/selenium/devtools/version.rb b/rb/lib/selenium/devtools/version.rb index 4d47cee6ccbbc..1cd0de56fffc2 100644 --- a/rb/lib/selenium/devtools/version.rb +++ b/rb/lib/selenium/devtools/version.rb @@ -19,6 +19,6 @@ module Selenium module DevTools - VERSION = '0.110.0' + VERSION = '0.111.0' end # DevTools end # Selenium