java.lang.Object
org.openqa.selenium.devtools.v85.browser.Browser

public class Browser extends Object
The Browser domain defines methods and events for browser managing.
  • 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

      @Beta 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)
      Set the behavior when downloading a file.
    • close

      public static org.openqa.selenium.devtools.Command<Void> close()
      Close browser gracefully.
    • crash

      @Beta public static org.openqa.selenium.devtools.Command<Void> crash()
      Crashes browser on the main thread.
    • crashGpuProcess

      @Beta public static org.openqa.selenium.devtools.Command<Void> crashGpuProcess()
      Crashes GPU process.
    • getVersion

      public static org.openqa.selenium.devtools.Command<Browser.GetVersionResponse> getVersion()
      Returns version information.
    • getBrowserCommandLine

      @Beta public static org.openqa.selenium.devtools.Command<List<String>> 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

      @Beta public static org.openqa.selenium.devtools.Command<Bounds> getWindowBounds(WindowID windowId)
      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.