Interface Browser


  • public interface Browser
    The Browser domain defines methods and events for browser managing
    • Method Detail

      • close

        void close()
        Close browser gracefully.
      • getVersion

        GetVersionResult getVersion()
        Returns version information.
        Returns:
        GetVersionResult
      • getBrowserCommandLine

        List<String> getBrowserCommandLine()
        Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.
        Returns:
        Commandline parameters
      • getHistograms

        List<Histogram> getHistograms​(String query,
                                      Boolean delta)
        Get Chrome histograms.
        Parameters:
        query - Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.
        delta - If true, retrieve delta since last call.
        Returns:
        Histograms.
      • getHistogram

        Histogram getHistogram​(String name,
                               Boolean delta)
        Get a Chrome histogram by name.
        Parameters:
        name - Requested histogram name.
        delta - If true, retrieve delta since last call.
        Returns:
        Histogram.
      • getWindowBounds

        Bounds getWindowBounds​(Integer windowId)
        Get position and size of the browser window.
        Parameters:
        windowId - Browser window id.
        Returns:
        Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
      • getWindowForTarget

        GetWindowForTargetResult getWindowForTarget​(String targetId)
        Get the browser window that contains the devtools target.
        Parameters:
        targetId - Devtools agent host id.
        Returns:
        GetWindowForTargetResult
      • setWindowBounds

        void setWindowBounds​(Integer windowId,
                             Bounds bounds)
        Set position and/or size of the browser window.
        Parameters:
        windowId - Browser window id.
        bounds - New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
      • getHistograms

        List<Histogram> getHistograms()
        Get Chrome histograms.
        Returns:
        Histograms.
      • getHistogram

        Histogram getHistogram​(String name)
        Get a Chrome histogram by name.
        Parameters:
        name - Requested histogram name.
        Returns:
        Histogram.