Class Browser
java.lang.Object
org.openqa.selenium.devtools.v135.browser.Browser
The Browser domain defines methods and events for browser managing.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static enum
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.openqa.selenium.devtools.Command
<Void> Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled.static org.openqa.selenium.devtools.Command
<Void> cancelDownload
(String guid, Optional<BrowserContextID> browserContextId) Cancel a download if in progressstatic org.openqa.selenium.devtools.Command
<Void> close()
Close browser gracefully.static org.openqa.selenium.devtools.Command
<Void> crash()
Crashes browser on the main thread.static org.openqa.selenium.devtools.Command
<Void> Crashes GPU process.static org.openqa.selenium.devtools.Event
<DownloadProgress> static org.openqa.selenium.devtools.Event
<DownloadWillBegin> static org.openqa.selenium.devtools.Command
<Void> executeBrowserCommand
(BrowserCommandId commandId) Invoke custom browser commands used by telemetry.Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.static org.openqa.selenium.devtools.Command
<Histogram> getHistogram
(String name, Optional<Boolean> delta) Get a Chrome histogram by name.getHistograms
(Optional<String> query, Optional<Boolean> delta) Get Chrome histograms.static org.openqa.selenium.devtools.Command
<Browser.GetVersionResponse> Returns version information.static org.openqa.selenium.devtools.Command
<Bounds> getWindowBounds
(WindowID windowId) Get position and size of the browser window.static org.openqa.selenium.devtools.Command
<Browser.GetWindowForTargetResponse> getWindowForTarget
(Optional<TargetID> targetId) Get the browser window that contains the devtools target.static org.openqa.selenium.devtools.Command
<Void> grantPermissions
(List<PermissionType> permissions, Optional<String> origin, Optional<BrowserContextID> browserContextId) Grant specific permissions to the given origin and reject all others.static org.openqa.selenium.devtools.Command
<Void> resetPermissions
(Optional<BrowserContextID> browserContextId) Reset all permission management for all origins.static org.openqa.selenium.devtools.Command
<Void> setDockTile
(Optional<String> badgeLabel, Optional<String> image) Set dock tile details, platform-specific.static org.openqa.selenium.devtools.Command
<Void> setDownloadBehavior
(Browser.SetDownloadBehaviorBehavior behavior, Optional<BrowserContextID> browserContextId, Optional<String> downloadPath, Optional<Boolean> eventsEnabled) Set the behavior when downloading a file.static org.openqa.selenium.devtools.Command
<Void> setPermission
(PermissionDescriptor permission, PermissionSetting setting, Optional<String> origin, Optional<BrowserContextID> browserContextId) Set permission settings for given origin.static org.openqa.selenium.devtools.Command
<Void> setWindowBounds
(WindowID windowId, Bounds bounds) Set position and/or size of the browser window.
-
Constructor Details
-
Browser
public Browser()
-
-
Method Details
-
setPermission
@Beta public static org.openqa.selenium.devtools.Command<Void> setPermission(PermissionDescriptor permission, PermissionSetting setting, Optional<String> origin, Optional<BrowserContextID> browserContextId) Set permission settings for given origin. -
grantPermissions
@Beta public static org.openqa.selenium.devtools.Command<Void> grantPermissions(List<PermissionType> permissions, Optional<String> origin, Optional<BrowserContextID> browserContextId) Grant specific permissions to the given origin and reject all others. -
resetPermissions
public static org.openqa.selenium.devtools.Command<Void> resetPermissions(Optional<BrowserContextID> browserContextId) Reset all permission management for all origins. -
setDownloadBehavior
@Beta public static org.openqa.selenium.devtools.Command<Void> setDownloadBehavior(Browser.SetDownloadBehaviorBehavior behavior, Optional<BrowserContextID> browserContextId, Optional<String> downloadPath, Optional<Boolean> eventsEnabled) Set the behavior when downloading a file. -
cancelDownload
@Beta public static org.openqa.selenium.devtools.Command<Void> cancelDownload(String guid, Optional<BrowserContextID> browserContextId) Cancel a download if in progress -
close
Close browser gracefully. -
crash
Crashes browser on the main thread. -
crashGpuProcess
Crashes GPU process. -
getVersion
Returns version information. -
getBrowserCommandLine
Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline. -
getHistograms
@Beta public static org.openqa.selenium.devtools.Command<List<Histogram>> getHistograms(Optional<String> query, Optional<Boolean> delta) Get Chrome histograms. -
getHistogram
@Beta public static org.openqa.selenium.devtools.Command<Histogram> getHistogram(String name, Optional<Boolean> delta) Get a Chrome histogram by name. -
getWindowBounds
Get position and size of the browser window. -
getWindowForTarget
@Beta public static org.openqa.selenium.devtools.Command<Browser.GetWindowForTargetResponse> getWindowForTarget(Optional<TargetID> targetId) Get the browser window that contains the devtools target. -
setWindowBounds
@Beta public static org.openqa.selenium.devtools.Command<Void> setWindowBounds(WindowID windowId, Bounds bounds) Set position and/or size of the browser window. -
setDockTile
@Beta public static org.openqa.selenium.devtools.Command<Void> setDockTile(Optional<String> badgeLabel, Optional<String> image) Set dock tile details, platform-specific. -
executeBrowserCommand
@Beta public static org.openqa.selenium.devtools.Command<Void> executeBrowserCommand(BrowserCommandId commandId) Invoke custom browser commands used by telemetry. -
addPrivacySandboxEnrollmentOverride
public static org.openqa.selenium.devtools.Command<Void> addPrivacySandboxEnrollmentOverride(String url) Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets. -
downloadWillBegin
-
downloadProgress
-