Class Page
- java.lang.Object
-
- org.openqa.selenium.devtools.v114.page.Page
-
public class Page extends java.lang.ObjectActions and events related to the inspected page belong to the page domain.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPage.CaptureScreenshotFormatstatic classPage.CaptureSnapshotFormatstatic classPage.GetAppIdResponsestatic classPage.GetAppManifestResponsestatic classPage.GetLayoutMetricsResponsestatic classPage.GetNavigationHistoryResponsestatic classPage.GetResourceContentResponsestatic classPage.NavigateResponsestatic classPage.PrintToPDFResponsestatic classPage.PrintToPDFTransferModestatic classPage.SetDownloadBehaviorBehaviorstatic classPage.SetTouchEmulationEnabledConfigurationstatic classPage.SetWebLifecycleStateStatestatic classPage.StartScreencastFormat
-
Constructor Summary
Constructors Constructor Description Page()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.openqa.selenium.devtools.Command<java.lang.Void>addCompilationCache(java.lang.String url, java.lang.String data)Seeds compilation cache for given url.static org.openqa.selenium.devtools.Command<ScriptIdentifier>addScriptToEvaluateOnLoad(java.lang.String scriptSource)Deprecated.static org.openqa.selenium.devtools.Command<ScriptIdentifier>addScriptToEvaluateOnNewDocument(java.lang.String source, java.util.Optional<java.lang.String> worldName, java.util.Optional<java.lang.Boolean> includeCommandLineAPI)Evaluates given script in every frame upon creation (before loading frame's scripts).static org.openqa.selenium.devtools.Event<BackForwardCacheNotUsed>backForwardCacheNotUsed()static org.openqa.selenium.devtools.Command<java.lang.Void>bringToFront()Brings page to front (activates tab).static org.openqa.selenium.devtools.Command<java.lang.String>captureScreenshot(java.util.Optional<Page.CaptureScreenshotFormat> format, java.util.Optional<java.lang.Integer> quality, java.util.Optional<Viewport> clip, java.util.Optional<java.lang.Boolean> fromSurface, java.util.Optional<java.lang.Boolean> captureBeyondViewport, java.util.Optional<java.lang.Boolean> optimizeForSpeed)Capture page screenshot.static org.openqa.selenium.devtools.Command<java.lang.String>captureSnapshot(java.util.Optional<Page.CaptureSnapshotFormat> format)Returns a snapshot of the page as a string.static org.openqa.selenium.devtools.Command<java.lang.Void>clearCompilationCache()Clears seeded compilation cache.static org.openqa.selenium.devtools.Command<java.lang.Void>clearDeviceMetricsOverride()Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>clearDeviceOrientationOverride()Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>clearGeolocationOverride()Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>close()Tries to close page, running its beforeunload hooks, if any.static org.openqa.selenium.devtools.Event<CompilationCacheProduced>compilationCacheProduced()static org.openqa.selenium.devtools.Command<java.lang.Void>crash()Crashes renderer on the IO thread, generates minidumps.static org.openqa.selenium.devtools.Command<ExecutionContextId>createIsolatedWorld(FrameId frameId, java.util.Optional<java.lang.String> worldName, java.util.Optional<java.lang.Boolean> grantUniveralAccess)Creates an isolated world for the given frame.static org.openqa.selenium.devtools.Command<java.lang.Void>deleteCookie(java.lang.String cookieName, java.lang.String url)Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>disable()Disables page domain notifications.static org.openqa.selenium.devtools.Event<Frame>documentOpened()static org.openqa.selenium.devtools.Event<MonotonicTime>domContentEventFired()static org.openqa.selenium.devtools.Event<DownloadProgress>downloadProgress()static org.openqa.selenium.devtools.Event<DownloadWillBegin>downloadWillBegin()static org.openqa.selenium.devtools.Command<java.lang.Void>enable()Enables page domain notifications.static org.openqa.selenium.devtools.Event<FileChooserOpened>fileChooserOpened()static org.openqa.selenium.devtools.Event<FrameAttached>frameAttached()static org.openqa.selenium.devtools.Event<FrameId>frameClearedScheduledNavigation()static org.openqa.selenium.devtools.Event<FrameDetached>frameDetached()static org.openqa.selenium.devtools.Event<FrameNavigated>frameNavigated()static org.openqa.selenium.devtools.Event<FrameRequestedNavigation>frameRequestedNavigation()static org.openqa.selenium.devtools.Event<java.lang.Void>frameResized()static org.openqa.selenium.devtools.Event<FrameScheduledNavigation>frameScheduledNavigation()static org.openqa.selenium.devtools.Event<FrameId>frameStartedLoading()static org.openqa.selenium.devtools.Event<FrameId>frameStoppedLoading()static org.openqa.selenium.devtools.Command<java.lang.Void>generateTestReport(java.lang.String message, java.util.Optional<java.lang.String> group)Generates a report for testing.static org.openqa.selenium.devtools.Command<AdScriptId>getAdScriptId(FrameId frameId)static org.openqa.selenium.devtools.Command<Page.GetAppIdResponse>getAppId()Returns the unique (PWA) app id.static org.openqa.selenium.devtools.Command<Page.GetAppManifestResponse>getAppManifest()static org.openqa.selenium.devtools.Command<java.util.List<Cookie>>getCookies()Deprecated.static org.openqa.selenium.devtools.Command<FrameTree>getFrameTree()Returns present frame tree structure.static org.openqa.selenium.devtools.Command<java.util.List<InstallabilityError>>getInstallabilityErrors()static org.openqa.selenium.devtools.Command<Page.GetLayoutMetricsResponse>getLayoutMetrics()Returns metrics relating to the layouting of the page, such as viewport bounds/scale.static org.openqa.selenium.devtools.Command<java.lang.String>getManifestIcons()Deprecated.static org.openqa.selenium.devtools.Command<Page.GetNavigationHistoryResponse>getNavigationHistory()Returns navigation history for the current page.static org.openqa.selenium.devtools.Command<java.util.List<OriginTrial>>getOriginTrials(FrameId frameId)Get Origin Trials on given frame.static org.openqa.selenium.devtools.Command<java.util.List<PermissionsPolicyFeatureState>>getPermissionsPolicyState(FrameId frameId)Get Permissions Policy state on given frame.static org.openqa.selenium.devtools.Command<Page.GetResourceContentResponse>getResourceContent(FrameId frameId, java.lang.String url)Returns content of the given resource.static org.openqa.selenium.devtools.Command<FrameResourceTree>getResourceTree()Returns present frame / resource tree structure.static org.openqa.selenium.devtools.Command<java.lang.Void>handleJavaScriptDialog(java.lang.Boolean accept, java.util.Optional<java.lang.String> promptText)Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).static org.openqa.selenium.devtools.Event<java.lang.Void>interstitialHidden()static org.openqa.selenium.devtools.Event<java.lang.Void>interstitialShown()static org.openqa.selenium.devtools.Event<JavascriptDialogClosed>javascriptDialogClosed()static org.openqa.selenium.devtools.Event<JavascriptDialogOpening>javascriptDialogOpening()static org.openqa.selenium.devtools.Event<LifecycleEvent>lifecycleEvent()static org.openqa.selenium.devtools.Event<MonotonicTime>loadEventFired()static org.openqa.selenium.devtools.Command<Page.NavigateResponse>navigate(java.lang.String url, java.util.Optional<java.lang.String> referrer, java.util.Optional<TransitionType> transitionType, java.util.Optional<FrameId> frameId, java.util.Optional<ReferrerPolicy> referrerPolicy)Navigates current page to the given URL.static org.openqa.selenium.devtools.Event<NavigatedWithinDocument>navigatedWithinDocument()static org.openqa.selenium.devtools.Command<java.lang.Void>navigateToHistoryEntry(java.lang.Integer entryId)Navigates current page to the given history entry.static org.openqa.selenium.devtools.Command<Page.PrintToPDFResponse>printToPDF(java.util.Optional<java.lang.Boolean> landscape, java.util.Optional<java.lang.Boolean> displayHeaderFooter, java.util.Optional<java.lang.Boolean> printBackground, java.util.Optional<java.lang.Number> scale, java.util.Optional<java.lang.Number> paperWidth, java.util.Optional<java.lang.Number> paperHeight, java.util.Optional<java.lang.Number> marginTop, java.util.Optional<java.lang.Number> marginBottom, java.util.Optional<java.lang.Number> marginLeft, java.util.Optional<java.lang.Number> marginRight, java.util.Optional<java.lang.String> pageRanges, java.util.Optional<java.lang.String> headerTemplate, java.util.Optional<java.lang.String> footerTemplate, java.util.Optional<java.lang.Boolean> preferCSSPageSize, java.util.Optional<Page.PrintToPDFTransferMode> transferMode)Print page as PDF.static org.openqa.selenium.devtools.Command<java.lang.Void>produceCompilationCache(java.util.List<CompilationCacheParams> scripts)Requests backend to produce compilation cache for the specified scripts.static org.openqa.selenium.devtools.Command<java.lang.Void>reload(java.util.Optional<java.lang.Boolean> ignoreCache, java.util.Optional<java.lang.String> scriptToEvaluateOnLoad)Reloads given page optionally ignoring the cache.static org.openqa.selenium.devtools.Command<java.lang.Void>removeScriptToEvaluateOnLoad(ScriptIdentifier identifier)Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>removeScriptToEvaluateOnNewDocument(ScriptIdentifier identifier)Removes given script from the list.static org.openqa.selenium.devtools.Command<java.lang.Void>resetNavigationHistory()Resets navigation history for the current page.static org.openqa.selenium.devtools.Event<ScreencastFrame>screencastFrame()static org.openqa.selenium.devtools.Command<java.lang.Void>screencastFrameAck(java.lang.Integer sessionId)Acknowledges that a screencast frame has been received by the frontend.static org.openqa.selenium.devtools.Event<java.lang.Boolean>screencastVisibilityChanged()static org.openqa.selenium.devtools.Command<java.util.List<SearchMatch>>searchInResource(FrameId frameId, java.lang.String url, java.lang.String query, java.util.Optional<java.lang.Boolean> caseSensitive, java.util.Optional<java.lang.Boolean> isRegex)Searches for given string in resource content.static org.openqa.selenium.devtools.Command<java.lang.Void>setAdBlockingEnabled(java.lang.Boolean enabled)Enable Chrome's experimental ad filter on all sites.static org.openqa.selenium.devtools.Command<java.lang.Void>setBypassCSP(java.lang.Boolean enabled)Enable page Content Security Policy by-passing.static org.openqa.selenium.devtools.Command<java.lang.Void>setDeviceMetricsOverride(java.lang.Integer width, java.lang.Integer height, java.lang.Number deviceScaleFactor, java.lang.Boolean mobile, java.util.Optional<java.lang.Number> scale, java.util.Optional<java.lang.Integer> screenWidth, java.util.Optional<java.lang.Integer> screenHeight, java.util.Optional<java.lang.Integer> positionX, java.util.Optional<java.lang.Integer> positionY, java.util.Optional<java.lang.Boolean> dontSetVisibleSize, java.util.Optional<ScreenOrientation> screenOrientation, java.util.Optional<Viewport> viewport)Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>setDeviceOrientationOverride(java.lang.Number alpha, java.lang.Number beta, java.lang.Number gamma)Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>setDocumentContent(FrameId frameId, java.lang.String html)Sets given markup as the document's HTML.static org.openqa.selenium.devtools.Command<java.lang.Void>setDownloadBehavior(Page.SetDownloadBehaviorBehavior behavior, java.util.Optional<java.lang.String> downloadPath)Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>setFontFamilies(FontFamilies fontFamilies, java.util.Optional<java.util.List<ScriptFontFamilies>> forScripts)Set generic font families.static org.openqa.selenium.devtools.Command<java.lang.Void>setFontSizes(FontSizes fontSizes)Set default font sizes.static org.openqa.selenium.devtools.Command<java.lang.Void>setGeolocationOverride(java.util.Optional<java.lang.Number> latitude, java.util.Optional<java.lang.Number> longitude, java.util.Optional<java.lang.Number> accuracy)Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>setInterceptFileChooserDialog(java.lang.Boolean enabled)Intercept file chooser requests and transfer control to protocol clients.static org.openqa.selenium.devtools.Command<java.lang.Void>setLifecycleEventsEnabled(java.lang.Boolean enabled)Controls whether page will emit lifecycle events.static org.openqa.selenium.devtools.Command<java.lang.Void>setRPHRegistrationMode(AutoResponseMode mode)Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automationstatic org.openqa.selenium.devtools.Command<java.lang.Void>setSPCTransactionMode(AutoResponseMode mode)Sets the Secure Payment Confirmation transaction mode.static org.openqa.selenium.devtools.Command<java.lang.Void>setTouchEmulationEnabled(java.lang.Boolean enabled, java.util.Optional<Page.SetTouchEmulationEnabledConfiguration> configuration)Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>setWebLifecycleState(Page.SetWebLifecycleStateState state)Tries to update the web lifecycle state of the page.static org.openqa.selenium.devtools.Command<java.lang.Void>startScreencast(java.util.Optional<Page.StartScreencastFormat> format, java.util.Optional<java.lang.Integer> quality, java.util.Optional<java.lang.Integer> maxWidth, java.util.Optional<java.lang.Integer> maxHeight, java.util.Optional<java.lang.Integer> everyNthFrame)Starts sending each frame using the `screencastFrame` event.static org.openqa.selenium.devtools.Command<java.lang.Void>stopLoading()Force the page stop all navigations and pending resource fetches.static org.openqa.selenium.devtools.Command<java.lang.Void>stopScreencast()Stops sending each frame in the `screencastFrame`.static org.openqa.selenium.devtools.Command<java.lang.Void>waitForDebugger()Pauses page execution.static org.openqa.selenium.devtools.Event<WindowOpen>windowOpen()
-
-
-
Method Detail
-
addScriptToEvaluateOnLoad
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<ScriptIdentifier> addScriptToEvaluateOnLoad(java.lang.String scriptSource)
Deprecated.Deprecated, please use addScriptToEvaluateOnNewDocument instead.
-
addScriptToEvaluateOnNewDocument
public static org.openqa.selenium.devtools.Command<ScriptIdentifier> addScriptToEvaluateOnNewDocument(java.lang.String source, java.util.Optional<java.lang.String> worldName, java.util.Optional<java.lang.Boolean> includeCommandLineAPI)
Evaluates given script in every frame upon creation (before loading frame's scripts).
-
bringToFront
public static org.openqa.selenium.devtools.Command<java.lang.Void> bringToFront()
Brings page to front (activates tab).
-
captureScreenshot
public static org.openqa.selenium.devtools.Command<java.lang.String> captureScreenshot(java.util.Optional<Page.CaptureScreenshotFormat> format, java.util.Optional<java.lang.Integer> quality, java.util.Optional<Viewport> clip, java.util.Optional<java.lang.Boolean> fromSurface, java.util.Optional<java.lang.Boolean> captureBeyondViewport, java.util.Optional<java.lang.Boolean> optimizeForSpeed)
Capture page screenshot.
-
captureSnapshot
@Beta public static org.openqa.selenium.devtools.Command<java.lang.String> captureSnapshot(java.util.Optional<Page.CaptureSnapshotFormat> format)
Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
-
clearDeviceMetricsOverride
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> clearDeviceMetricsOverride()
Deprecated.Clears the overridden device metrics.
-
clearDeviceOrientationOverride
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> clearDeviceOrientationOverride()
Deprecated.Clears the overridden Device Orientation.
-
clearGeolocationOverride
@Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> clearGeolocationOverride()
Deprecated.Clears the overridden Geolocation Position and Error.
-
createIsolatedWorld
public static org.openqa.selenium.devtools.Command<ExecutionContextId> createIsolatedWorld(FrameId frameId, java.util.Optional<java.lang.String> worldName, java.util.Optional<java.lang.Boolean> grantUniveralAccess)
Creates an isolated world for the given frame.
-
deleteCookie
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> deleteCookie(java.lang.String cookieName, java.lang.String url)Deprecated.Deletes browser cookie with given name, domain and path.
-
disable
public static org.openqa.selenium.devtools.Command<java.lang.Void> disable()
Disables page domain notifications.
-
enable
public static org.openqa.selenium.devtools.Command<java.lang.Void> enable()
Enables page domain notifications.
-
getAppManifest
public static org.openqa.selenium.devtools.Command<Page.GetAppManifestResponse> getAppManifest()
-
getInstallabilityErrors
@Beta public static org.openqa.selenium.devtools.Command<java.util.List<InstallabilityError>> getInstallabilityErrors()
-
getManifestIcons
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<java.lang.String> getManifestIcons()
Deprecated.Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
-
getAppId
@Beta public static org.openqa.selenium.devtools.Command<Page.GetAppIdResponse> getAppId()
Returns the unique (PWA) app id. Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
-
getAdScriptId
@Beta public static org.openqa.selenium.devtools.Command<AdScriptId> getAdScriptId(FrameId frameId)
-
getCookies
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<java.util.List<Cookie>> getCookies()
Deprecated.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.
-
getFrameTree
public static org.openqa.selenium.devtools.Command<FrameTree> getFrameTree()
Returns present frame tree structure.
-
getLayoutMetrics
public static org.openqa.selenium.devtools.Command<Page.GetLayoutMetricsResponse> getLayoutMetrics()
Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
-
getNavigationHistory
public static org.openqa.selenium.devtools.Command<Page.GetNavigationHistoryResponse> getNavigationHistory()
Returns navigation history for the current page.
-
resetNavigationHistory
public static org.openqa.selenium.devtools.Command<java.lang.Void> resetNavigationHistory()
Resets navigation history for the current page.
-
getResourceContent
@Beta public static org.openqa.selenium.devtools.Command<Page.GetResourceContentResponse> getResourceContent(FrameId frameId, java.lang.String url)
Returns content of the given resource.
-
getResourceTree
@Beta public static org.openqa.selenium.devtools.Command<FrameResourceTree> getResourceTree()
Returns present frame / resource tree structure.
-
handleJavaScriptDialog
public static org.openqa.selenium.devtools.Command<java.lang.Void> handleJavaScriptDialog(java.lang.Boolean accept, java.util.Optional<java.lang.String> promptText)Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
-
navigate
public static org.openqa.selenium.devtools.Command<Page.NavigateResponse> navigate(java.lang.String url, java.util.Optional<java.lang.String> referrer, java.util.Optional<TransitionType> transitionType, java.util.Optional<FrameId> frameId, java.util.Optional<ReferrerPolicy> referrerPolicy)
Navigates current page to the given URL.
-
navigateToHistoryEntry
public static org.openqa.selenium.devtools.Command<java.lang.Void> navigateToHistoryEntry(java.lang.Integer entryId)
Navigates current page to the given history entry.
-
printToPDF
public static org.openqa.selenium.devtools.Command<Page.PrintToPDFResponse> printToPDF(java.util.Optional<java.lang.Boolean> landscape, java.util.Optional<java.lang.Boolean> displayHeaderFooter, java.util.Optional<java.lang.Boolean> printBackground, java.util.Optional<java.lang.Number> scale, java.util.Optional<java.lang.Number> paperWidth, java.util.Optional<java.lang.Number> paperHeight, java.util.Optional<java.lang.Number> marginTop, java.util.Optional<java.lang.Number> marginBottom, java.util.Optional<java.lang.Number> marginLeft, java.util.Optional<java.lang.Number> marginRight, java.util.Optional<java.lang.String> pageRanges, java.util.Optional<java.lang.String> headerTemplate, java.util.Optional<java.lang.String> footerTemplate, java.util.Optional<java.lang.Boolean> preferCSSPageSize, java.util.Optional<Page.PrintToPDFTransferMode> transferMode)
Print page as PDF.
-
reload
public static org.openqa.selenium.devtools.Command<java.lang.Void> reload(java.util.Optional<java.lang.Boolean> ignoreCache, java.util.Optional<java.lang.String> scriptToEvaluateOnLoad)Reloads given page optionally ignoring the cache.
-
removeScriptToEvaluateOnLoad
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> removeScriptToEvaluateOnLoad(ScriptIdentifier identifier)
Deprecated.Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
-
removeScriptToEvaluateOnNewDocument
public static org.openqa.selenium.devtools.Command<java.lang.Void> removeScriptToEvaluateOnNewDocument(ScriptIdentifier identifier)
Removes given script from the list.
-
screencastFrameAck
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> screencastFrameAck(java.lang.Integer sessionId)
Acknowledges that a screencast frame has been received by the frontend.
-
searchInResource
@Beta public static org.openqa.selenium.devtools.Command<java.util.List<SearchMatch>> searchInResource(FrameId frameId, java.lang.String url, java.lang.String query, java.util.Optional<java.lang.Boolean> caseSensitive, java.util.Optional<java.lang.Boolean> isRegex)
Searches for given string in resource content.
-
setAdBlockingEnabled
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> setAdBlockingEnabled(java.lang.Boolean enabled)
Enable Chrome's experimental ad filter on all sites.
-
setBypassCSP
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> setBypassCSP(java.lang.Boolean enabled)
Enable page Content Security Policy by-passing.
-
getPermissionsPolicyState
@Beta public static org.openqa.selenium.devtools.Command<java.util.List<PermissionsPolicyFeatureState>> getPermissionsPolicyState(FrameId frameId)
Get Permissions Policy state on given frame.
-
getOriginTrials
@Beta public static org.openqa.selenium.devtools.Command<java.util.List<OriginTrial>> getOriginTrials(FrameId frameId)
Get Origin Trials on given frame.
-
setDeviceMetricsOverride
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> setDeviceMetricsOverride(java.lang.Integer width, java.lang.Integer height, java.lang.Number deviceScaleFactor, java.lang.Boolean mobile, java.util.Optional<java.lang.Number> scale, java.util.Optional<java.lang.Integer> screenWidth, java.util.Optional<java.lang.Integer> screenHeight, java.util.Optional<java.lang.Integer> positionX, java.util.Optional<java.lang.Integer> positionY, java.util.Optional<java.lang.Boolean> dontSetVisibleSize, java.util.Optional<ScreenOrientation> screenOrientation, java.util.Optional<Viewport> viewport)Deprecated.Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
-
setDeviceOrientationOverride
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> setDeviceOrientationOverride(java.lang.Number alpha, java.lang.Number beta, java.lang.Number gamma)Deprecated.Overrides the Device Orientation.
-
setFontFamilies
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> setFontFamilies(FontFamilies fontFamilies, java.util.Optional<java.util.List<ScriptFontFamilies>> forScripts)
Set generic font families.
-
setFontSizes
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> setFontSizes(FontSizes fontSizes)
Set default font sizes.
-
setDocumentContent
public static org.openqa.selenium.devtools.Command<java.lang.Void> setDocumentContent(FrameId frameId, java.lang.String html)
Sets given markup as the document's HTML.
-
setDownloadBehavior
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> setDownloadBehavior(Page.SetDownloadBehaviorBehavior behavior, java.util.Optional<java.lang.String> downloadPath)
Deprecated.Set the behavior when downloading a file.
-
setGeolocationOverride
@Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> setGeolocationOverride(java.util.Optional<java.lang.Number> latitude, java.util.Optional<java.lang.Number> longitude, java.util.Optional<java.lang.Number> accuracy)Deprecated.Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
-
setLifecycleEventsEnabled
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> setLifecycleEventsEnabled(java.lang.Boolean enabled)
Controls whether page will emit lifecycle events.
-
setTouchEmulationEnabled
@Beta @Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> setTouchEmulationEnabled(java.lang.Boolean enabled, java.util.Optional<Page.SetTouchEmulationEnabledConfiguration> configuration)Deprecated.Toggles mouse event-based touch event emulation.
-
startScreencast
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> startScreencast(java.util.Optional<Page.StartScreencastFormat> format, java.util.Optional<java.lang.Integer> quality, java.util.Optional<java.lang.Integer> maxWidth, java.util.Optional<java.lang.Integer> maxHeight, java.util.Optional<java.lang.Integer> everyNthFrame)
Starts sending each frame using the `screencastFrame` event.
-
stopLoading
public static org.openqa.selenium.devtools.Command<java.lang.Void> stopLoading()
Force the page stop all navigations and pending resource fetches.
-
crash
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> crash()
Crashes renderer on the IO thread, generates minidumps.
-
close
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> close()
Tries to close page, running its beforeunload hooks, if any.
-
setWebLifecycleState
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> setWebLifecycleState(Page.SetWebLifecycleStateState state)
Tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/
-
stopScreencast
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> stopScreencast()
Stops sending each frame in the `screencastFrame`.
-
produceCompilationCache
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> produceCompilationCache(java.util.List<CompilationCacheParams> scripts)
Requests backend to produce compilation cache for the specified scripts. `scripts` are appeneded to the list of scripts for which the cache would be produced. The list may be reset during page navigation. When script with a matching URL is encountered, the cache is optionally produced upon backend discretion, based on internal heuristics. See also: `Page.compilationCacheProduced`.
-
addCompilationCache
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> addCompilationCache(java.lang.String url, java.lang.String data)Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
-
clearCompilationCache
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> clearCompilationCache()
Clears seeded compilation cache.
-
setSPCTransactionMode
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> setSPCTransactionMode(AutoResponseMode mode)
Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
-
setRPHRegistrationMode
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> setRPHRegistrationMode(AutoResponseMode mode)
Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
-
generateTestReport
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> generateTestReport(java.lang.String message, java.util.Optional<java.lang.String> group)Generates a report for testing.
-
waitForDebugger
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> waitForDebugger()
Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
-
setInterceptFileChooserDialog
@Beta public static org.openqa.selenium.devtools.Command<java.lang.Void> setInterceptFileChooserDialog(java.lang.Boolean enabled)
Intercept file chooser requests and transfer control to protocol clients. When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event `Page.fileChooserOpened` is emitted.
-
domContentEventFired
public static org.openqa.selenium.devtools.Event<MonotonicTime> domContentEventFired()
-
fileChooserOpened
public static org.openqa.selenium.devtools.Event<FileChooserOpened> fileChooserOpened()
-
frameAttached
public static org.openqa.selenium.devtools.Event<FrameAttached> frameAttached()
-
frameClearedScheduledNavigation
public static org.openqa.selenium.devtools.Event<FrameId> frameClearedScheduledNavigation()
-
frameDetached
public static org.openqa.selenium.devtools.Event<FrameDetached> frameDetached()
-
frameNavigated
public static org.openqa.selenium.devtools.Event<FrameNavigated> frameNavigated()
-
documentOpened
public static org.openqa.selenium.devtools.Event<Frame> documentOpened()
-
frameResized
public static org.openqa.selenium.devtools.Event<java.lang.Void> frameResized()
-
frameRequestedNavigation
public static org.openqa.selenium.devtools.Event<FrameRequestedNavigation> frameRequestedNavigation()
-
frameScheduledNavigation
public static org.openqa.selenium.devtools.Event<FrameScheduledNavigation> frameScheduledNavigation()
-
frameStartedLoading
public static org.openqa.selenium.devtools.Event<FrameId> frameStartedLoading()
-
frameStoppedLoading
public static org.openqa.selenium.devtools.Event<FrameId> frameStoppedLoading()
-
downloadWillBegin
public static org.openqa.selenium.devtools.Event<DownloadWillBegin> downloadWillBegin()
-
downloadProgress
public static org.openqa.selenium.devtools.Event<DownloadProgress> downloadProgress()
-
interstitialHidden
public static org.openqa.selenium.devtools.Event<java.lang.Void> interstitialHidden()
-
interstitialShown
public static org.openqa.selenium.devtools.Event<java.lang.Void> interstitialShown()
-
javascriptDialogClosed
public static org.openqa.selenium.devtools.Event<JavascriptDialogClosed> javascriptDialogClosed()
-
javascriptDialogOpening
public static org.openqa.selenium.devtools.Event<JavascriptDialogOpening> javascriptDialogOpening()
-
lifecycleEvent
public static org.openqa.selenium.devtools.Event<LifecycleEvent> lifecycleEvent()
-
backForwardCacheNotUsed
public static org.openqa.selenium.devtools.Event<BackForwardCacheNotUsed> backForwardCacheNotUsed()
-
loadEventFired
public static org.openqa.selenium.devtools.Event<MonotonicTime> loadEventFired()
-
navigatedWithinDocument
public static org.openqa.selenium.devtools.Event<NavigatedWithinDocument> navigatedWithinDocument()
-
screencastFrame
public static org.openqa.selenium.devtools.Event<ScreencastFrame> screencastFrame()
-
screencastVisibilityChanged
public static org.openqa.selenium.devtools.Event<java.lang.Boolean> screencastVisibilityChanged()
-
windowOpen
public static org.openqa.selenium.devtools.Event<WindowOpen> windowOpen()
-
compilationCacheProduced
public static org.openqa.selenium.devtools.Event<CompilationCacheProduced> compilationCacheProduced()
-
-