Package io.webfolder.cdp.command
Interface Browser
-
public interface Browser
The Browser domain defines methods and events for browser managing
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close browser gracefully.List<String>
getBrowserCommandLine()
Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.Histogram
getHistogram(String name)
Get a Chrome histogram by name.Histogram
getHistogram(String name, Boolean delta)
Get a Chrome histogram by name.List<Histogram>
getHistograms()
Get Chrome histograms.List<Histogram>
getHistograms(String query, Boolean delta)
Get Chrome histograms.GetVersionResult
getVersion()
Returns version information.Bounds
getWindowBounds(Integer windowId)
Get position and size of the browser window.GetWindowForTargetResult
getWindowForTarget(String targetId)
Get the browser window that contains the devtools target.void
setWindowBounds(Integer windowId, Bounds bounds)
Set position and/or size of the browser window.
-
-
-
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.
-
-