-
public final class PageDomainActions and events related to the inspected page belong to the page domain.
-
-
Method Summary
Modifier and Type Method Description final Flow<PageEvent>events()Subscribes to all events related to this domain. final Flow<PageEvent.DomContentEventFiredEvent>domContentEventFired()Official doc final Flow<PageEvent.FileChooserOpenedEvent>fileChooserOpened()Emitted only when page.interceptFileChooseris enabled.final Flow<PageEvent.FrameAttachedEvent>frameAttached()Fired when frame has been attached to its parent. final Flow<PageEvent.FrameClearedScheduledNavigationEvent>frameClearedScheduledNavigation()Fired when frame no longer has a scheduled navigation. final Flow<PageEvent.FrameDetachedEvent>frameDetached()Fired when frame has been detached from its parent. final Flow<PageEvent.FrameNavigatedEvent>frameNavigated()Fired once navigation of the frame has completed. final Flow<PageEvent.DocumentOpenedEvent>documentOpened()Fired when opening document to write to. final Flow<PageEvent.FrameResizedEvent>frameResized()Official doc final Flow<PageEvent.FrameRequestedNavigationEvent>frameRequestedNavigation()Fired when a renderer-initiated navigation is requested. final Flow<PageEvent.FrameScheduledNavigationEvent>frameScheduledNavigation()Fired when frame schedules a potential navigation. final Flow<PageEvent.FrameStartedLoadingEvent>frameStartedLoading()Fired when frame has started loading. final Flow<PageEvent.FrameStoppedLoadingEvent>frameStoppedLoading()Fired when frame has stopped loading. final Flow<PageEvent.DownloadWillBeginEvent>downloadWillBegin()Fired when page is about to start a download. final Flow<PageEvent.DownloadProgressEvent>downloadProgress()Fired when download makes progress. final Flow<PageEvent.InterstitialHiddenEvent>interstitialHidden()Fired when interstitial page was hiddenOfficial doc final Flow<PageEvent.InterstitialShownEvent>interstitialShown()Fired when interstitial page was shownOfficial doc final Flow<PageEvent.JavascriptDialogClosedEvent>javascriptDialogClosed()Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed. final Flow<PageEvent.JavascriptDialogOpeningEvent>javascriptDialogOpening()Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open. final Flow<PageEvent.LifecycleEventEvent>lifecycleEvent()Fired for top level page lifecycle events such as navigation, load, paint, etc. final Flow<PageEvent.LoadEventFiredEvent>loadEventFired()Official doc final Flow<PageEvent.NavigatedWithinDocumentEvent>navigatedWithinDocument()Fired when same-document navigation happens, e.g. final Flow<PageEvent.ScreencastFrameEvent>screencastFrame()Compressed image data requested by the startScreencast.final Flow<PageEvent.ScreencastVisibilityChangedEvent>screencastVisibilityChanged()Fired when the page with currently enabled screencast was shown or hidden `. final Flow<PageEvent.WindowOpenEvent>windowOpen()Fired when a new window is going to be opened, via window.open(), link click, form submission, etc. final Flow<PageEvent.CompilationCacheProducedEvent>compilationCacheProduced()Issued for every compilation cache generated. final AddScriptToEvaluateOnLoadResponseaddScriptToEvaluateOnLoad(AddScriptToEvaluateOnLoadRequest input)Deprecated, please use addScriptToEvaluateOnNewDocument instead. final AddScriptToEvaluateOnNewDocumentResponseaddScriptToEvaluateOnNewDocument(AddScriptToEvaluateOnNewDocumentRequest input)Evaluates given script in every frame upon creation (before loading frame's scripts). final UnitbringToFront()Brings page to front (activates tab). final CaptureScreenshotResponsecaptureScreenshot(CaptureScreenshotRequest input)Capture page screenshot. final CaptureSnapshotResponsecaptureSnapshot(CaptureSnapshotRequest input)Returns a snapshot of the page as a string. final UnitclearDeviceMetricsOverride()Clears the overriden device metrics. final UnitclearDeviceOrientationOverride()Clears the overridden Device Orientation. final UnitclearGeolocationOverride()Clears the overriden Geolocation Position and Error. final CreateIsolatedWorldResponsecreateIsolatedWorld(CreateIsolatedWorldRequest input)Creates an isolated world for the given frame. final UnitdeleteCookie(DeleteCookieRequest input)Deletes browser cookie with given name, domain and path. final Unitdisable()Disables page domain notifications. final Unitenable()Enables page domain notifications. final GetAppManifestResponsegetAppManifest()Official doc final GetInstallabilityErrorsResponsegetInstallabilityErrors()Official doc final GetManifestIconsResponsegetManifestIcons()Official doc final GetCookiesResponsegetCookies()Returns all browser cookies. final GetFrameTreeResponsegetFrameTree()Returns present frame tree structure. final GetLayoutMetricsResponsegetLayoutMetrics()Returns metrics relating to the layouting of the page, such as viewport bounds/scale. final GetNavigationHistoryResponsegetNavigationHistory()Returns navigation history for the current page. final UnitresetNavigationHistory()Resets navigation history for the current page. final GetResourceContentResponsegetResourceContent(GetResourceContentRequest input)Returns content of the given resource. final GetResourceTreeResponsegetResourceTree()Returns present frame / resource tree structure. final UnithandleJavaScriptDialog(HandleJavaScriptDialogRequest input)Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). final NavigateResponsenavigate(NavigateRequest input)Navigates current page to the given URL. final UnitnavigateToHistoryEntry(NavigateToHistoryEntryRequest input)Navigates current page to the given history entry. final PrintToPDFResponseprintToPDF(PrintToPDFRequest input)Print page as PDF. final Unitreload(ReloadRequest input)Reloads given page optionally ignoring the cache. final UnitremoveScriptToEvaluateOnLoad(RemoveScriptToEvaluateOnLoadRequest input)Deprecated, please use removeScriptToEvaluateOnNewDocument instead. final UnitremoveScriptToEvaluateOnNewDocument(RemoveScriptToEvaluateOnNewDocumentRequest input)Removes given script from the list. final UnitscreencastFrameAck(ScreencastFrameAckRequest input)Acknowledges that a screencast frame has been received by the frontend. final SearchInResourceResponsesearchInResource(SearchInResourceRequest input)Searches for given string in resource content. final UnitsetAdBlockingEnabled(SetAdBlockingEnabledRequest input)Enable Chrome's experimental ad filter on all sites. final UnitsetBypassCSP(SetBypassCSPRequest input)Enable page Content Security Policy by-passing. final UnitsetDeviceMetricsOverride(SetDeviceMetricsOverrideRequest input)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). final UnitsetDeviceOrientationOverride(SetDeviceOrientationOverrideRequest input)Overrides the Device Orientation. final UnitsetFontFamilies(SetFontFamiliesRequest input)Set generic font families. final UnitsetFontSizes(SetFontSizesRequest input)Set default font sizes. final UnitsetDocumentContent(SetDocumentContentRequest input)Sets given markup as the document's HTML. final UnitsetDownloadBehavior(SetDownloadBehaviorRequest input)Set the behavior when downloading a file. final UnitsetGeolocationOverride(SetGeolocationOverrideRequest input)Overrides the Geolocation Position or Error. final UnitsetLifecycleEventsEnabled(SetLifecycleEventsEnabledRequest input)Controls whether page will emit lifecycle events. final UnitsetTouchEmulationEnabled(SetTouchEmulationEnabledRequest input)Toggles mouse event-based touch event emulation. final UnitstartScreencast(StartScreencastRequest input)Starts sending each frame using the screencastFrameevent.final UnitstopLoading()Force the page stop all navigations and pending resource fetches. final Unitcrash()Crashes renderer on the IO thread, generates minidumps. final Unitclose()Tries to close page, running its beforeunload hooks, if any. final UnitsetWebLifecycleState(SetWebLifecycleStateRequest input)Tries to update the web lifecycle state of the page. final UnitstopScreencast()Stops sending each frame in the screencastFrame.final UnitsetProduceCompilationCache(SetProduceCompilationCacheRequest input)Forces compilation cache to be generated for every subresource script. final UnitaddCompilationCache(AddCompilationCacheRequest input)Seeds compilation cache for given url. final UnitclearCompilationCache()Clears seeded compilation cache. final UnitgenerateTestReport(GenerateTestReportRequest input)Generates a report for testing. final UnitwaitForDebugger()Pauses page execution. final UnitsetInterceptFileChooserDialog(SetInterceptFileChooserDialogRequest input)Intercept file chooser requests and transfer control to protocol clients. -
-
Method Detail
-
domContentEventFired
final Flow<PageEvent.DomContentEventFiredEvent> domContentEventFired()
-
fileChooserOpened
final Flow<PageEvent.FileChooserOpenedEvent> fileChooserOpened()
Emitted only when
page.interceptFileChooseris enabled.
-
frameAttached
final Flow<PageEvent.FrameAttachedEvent> frameAttached()
Fired when frame has been attached to its parent.
-
frameClearedScheduledNavigation
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Flow<PageEvent.FrameClearedScheduledNavigationEvent> frameClearedScheduledNavigation()
Fired when frame no longer has a scheduled navigation.
-
frameDetached
final Flow<PageEvent.FrameDetachedEvent> frameDetached()
Fired when frame has been detached from its parent.
-
frameNavigated
final Flow<PageEvent.FrameNavigatedEvent> frameNavigated()
Fired once navigation of the frame has completed. Frame is now associated with the new loader.
-
documentOpened
final Flow<PageEvent.DocumentOpenedEvent> documentOpened()
Fired when opening document to write to.
-
frameResized
final Flow<PageEvent.FrameResizedEvent> frameResized()
-
frameRequestedNavigation
final Flow<PageEvent.FrameRequestedNavigationEvent> frameRequestedNavigation()
Fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.
-
frameScheduledNavigation
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Flow<PageEvent.FrameScheduledNavigationEvent> frameScheduledNavigation()
Fired when frame schedules a potential navigation.
-
frameStartedLoading
final Flow<PageEvent.FrameStartedLoadingEvent> frameStartedLoading()
Fired when frame has started loading.
-
frameStoppedLoading
final Flow<PageEvent.FrameStoppedLoadingEvent> frameStoppedLoading()
Fired when frame has stopped loading.
-
downloadWillBegin
final Flow<PageEvent.DownloadWillBeginEvent> downloadWillBegin()
Fired when page is about to start a download.
-
downloadProgress
final Flow<PageEvent.DownloadProgressEvent> downloadProgress()
Fired when download makes progress. Last call has |done| == true.
-
interstitialHidden
final Flow<PageEvent.InterstitialHiddenEvent> interstitialHidden()
Fired when interstitial page was hidden
-
interstitialShown
final Flow<PageEvent.InterstitialShownEvent> interstitialShown()
Fired when interstitial page was shown
-
javascriptDialogClosed
final Flow<PageEvent.JavascriptDialogClosedEvent> javascriptDialogClosed()
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
-
javascriptDialogOpening
final Flow<PageEvent.JavascriptDialogOpeningEvent> javascriptDialogOpening()
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
-
lifecycleEvent
final Flow<PageEvent.LifecycleEventEvent> lifecycleEvent()
Fired for top level page lifecycle events such as navigation, load, paint, etc.
-
loadEventFired
final Flow<PageEvent.LoadEventFiredEvent> loadEventFired()
-
navigatedWithinDocument
final Flow<PageEvent.NavigatedWithinDocumentEvent> navigatedWithinDocument()
Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
-
screencastFrame
final Flow<PageEvent.ScreencastFrameEvent> screencastFrame()
Compressed image data requested by the
startScreencast.
-
screencastVisibilityChanged
final Flow<PageEvent.ScreencastVisibilityChangedEvent> screencastVisibilityChanged()
Fired when the page with currently enabled screencast was shown or hidden `.
-
windowOpen
final Flow<PageEvent.WindowOpenEvent> windowOpen()
Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.
-
compilationCacheProduced
final Flow<PageEvent.CompilationCacheProducedEvent> compilationCacheProduced()
Issued for every compilation cache generated. Is only available if Page.setGenerateCompilationCache is enabled.
-
addScriptToEvaluateOnLoad
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final AddScriptToEvaluateOnLoadResponse addScriptToEvaluateOnLoad(AddScriptToEvaluateOnLoadRequest input)
Deprecated, please use addScriptToEvaluateOnNewDocument instead.
-
addScriptToEvaluateOnNewDocument
final AddScriptToEvaluateOnNewDocumentResponse addScriptToEvaluateOnNewDocument(AddScriptToEvaluateOnNewDocumentRequest input)
Evaluates given script in every frame upon creation (before loading frame's scripts).
-
bringToFront
final Unit bringToFront()
Brings page to front (activates tab).
-
captureScreenshot
final CaptureScreenshotResponse captureScreenshot(CaptureScreenshotRequest input)
Capture page screenshot.
-
captureSnapshot
final CaptureSnapshotResponse captureSnapshot(CaptureSnapshotRequest input)
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
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit clearDeviceMetricsOverride()
Clears the overriden device metrics.
-
clearDeviceOrientationOverride
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit clearDeviceOrientationOverride()
Clears the overridden Device Orientation.
-
clearGeolocationOverride
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit clearGeolocationOverride()
Clears the overriden Geolocation Position and Error.
-
createIsolatedWorld
final CreateIsolatedWorldResponse createIsolatedWorld(CreateIsolatedWorldRequest input)
Creates an isolated world for the given frame.
-
deleteCookie
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit deleteCookie(DeleteCookieRequest input)
Deletes browser cookie with given name, domain and path.
-
getAppManifest
final GetAppManifestResponse getAppManifest()
-
getInstallabilityErrors
final GetInstallabilityErrorsResponse getInstallabilityErrors()
-
getManifestIcons
final GetManifestIconsResponse getManifestIcons()
-
getCookies
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final GetCookiesResponse getCookies()
Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the
cookiesfield.
-
getFrameTree
final GetFrameTreeResponse getFrameTree()
Returns present frame tree structure.
-
getLayoutMetrics
final GetLayoutMetricsResponse getLayoutMetrics()
Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
-
getNavigationHistory
final GetNavigationHistoryResponse getNavigationHistory()
Returns navigation history for the current page.
-
resetNavigationHistory
final Unit resetNavigationHistory()
Resets navigation history for the current page.
-
getResourceContent
final GetResourceContentResponse getResourceContent(GetResourceContentRequest input)
Returns content of the given resource.
-
getResourceTree
final GetResourceTreeResponse getResourceTree()
Returns present frame / resource tree structure.
-
handleJavaScriptDialog
final Unit handleJavaScriptDialog(HandleJavaScriptDialogRequest input)
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
-
navigate
final NavigateResponse navigate(NavigateRequest input)
Navigates current page to the given URL.
-
navigateToHistoryEntry
final Unit navigateToHistoryEntry(NavigateToHistoryEntryRequest input)
Navigates current page to the given history entry.
-
printToPDF
final PrintToPDFResponse printToPDF(PrintToPDFRequest input)
Print page as PDF.
-
reload
final Unit reload(ReloadRequest input)
Reloads given page optionally ignoring the cache.
-
removeScriptToEvaluateOnLoad
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit removeScriptToEvaluateOnLoad(RemoveScriptToEvaluateOnLoadRequest input)
Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
-
removeScriptToEvaluateOnNewDocument
final Unit removeScriptToEvaluateOnNewDocument(RemoveScriptToEvaluateOnNewDocumentRequest input)
Removes given script from the list.
-
screencastFrameAck
final Unit screencastFrameAck(ScreencastFrameAckRequest input)
Acknowledges that a screencast frame has been received by the frontend.
-
searchInResource
final SearchInResourceResponse searchInResource(SearchInResourceRequest input)
Searches for given string in resource content.
-
setAdBlockingEnabled
final Unit setAdBlockingEnabled(SetAdBlockingEnabledRequest input)
Enable Chrome's experimental ad filter on all sites.
-
setBypassCSP
final Unit setBypassCSP(SetBypassCSPRequest input)
Enable page Content Security Policy by-passing.
-
setDeviceMetricsOverride
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit setDeviceMetricsOverride(SetDeviceMetricsOverrideRequest input)
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
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit setDeviceOrientationOverride(SetDeviceOrientationOverrideRequest input)
Overrides the Device Orientation.
-
setFontFamilies
final Unit setFontFamilies(SetFontFamiliesRequest input)
Set generic font families.
-
setFontSizes
final Unit setFontSizes(SetFontSizesRequest input)
Set default font sizes.
-
setDocumentContent
final Unit setDocumentContent(SetDocumentContentRequest input)
Sets given markup as the document's HTML.
-
setDownloadBehavior
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit setDownloadBehavior(SetDownloadBehaviorRequest input)
Set the behavior when downloading a file.
-
setGeolocationOverride
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit setGeolocationOverride(SetGeolocationOverrideRequest input)
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
-
setLifecycleEventsEnabled
final Unit setLifecycleEventsEnabled(SetLifecycleEventsEnabledRequest input)
Controls whether page will emit lifecycle events.
-
setTouchEmulationEnabled
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") final Unit setTouchEmulationEnabled(SetTouchEmulationEnabledRequest input)
Toggles mouse event-based touch event emulation.
-
startScreencast
final Unit startScreencast(StartScreencastRequest input)
Starts sending each frame using the
screencastFrameevent.
-
stopLoading
final Unit stopLoading()
Force the page stop all navigations and pending resource fetches.
-
setWebLifecycleState
final Unit setWebLifecycleState(SetWebLifecycleStateRequest input)
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
final Unit stopScreencast()
Stops sending each frame in the
screencastFrame.
-
setProduceCompilationCache
final Unit setProduceCompilationCache(SetProduceCompilationCacheRequest input)
Forces compilation cache to be generated for every subresource script.
-
addCompilationCache
final Unit addCompilationCache(AddCompilationCacheRequest input)
Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
-
clearCompilationCache
final Unit clearCompilationCache()
Clears seeded compilation cache.
-
generateTestReport
final Unit generateTestReport(GenerateTestReportRequest input)
Generates a report for testing.
-
waitForDebugger
final Unit waitForDebugger()
Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
-
setInterceptFileChooserDialog
final Unit setInterceptFileChooserDialog(SetInterceptFileChooserDialogRequest input)
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.fileChooserOpenedis emitted.
-
-
-
-