Package Torello.Browser.BrowserAPI
Class Overlay
- java.lang.Object
-
- Torello.Browser.BrowserAPI.Overlay
-
public class Overlay extends java.lang.Object
This class was built using the Chrome Remote Dev-Tools A.P.I., which is specified by two JSON-RPC Files. These files were obtained from the Chrome Dev Tools Protocol Git Hub Page, which has a "Tip of Tree" (the latest) API-Specification Page Here: JSON-RPC Protocol Specification.
These files were converted into this Java-Browser (CDP) Library. The intention is to have them function in a similar fasion to the Node.js Tool known as 'Puppeteer', Microsoft's 'Playwright' and of course the Main-Stay 'Selenium.' The Java-HTML JAR Library merely implements the Java Types & Commands defined by Google's DevTools Protocol.
🧠 View the Google CDP API:
This domain provides various functionality related to drawing atop the inspected page.
The top-level description and explanation for this class (this comment, at the top this Java-Doc Page) is repeated, verbatim, across all of the domain classes which comprise Google's CDP API.This class is intended to be used with a Browser Instance
These methods have been tested, to some degree, using Google Chrome. In order to use this class you must start a web-browser instance and make a connection to the browser using aRemote Debugging Port. Google-Corporation is the developer of this API, but any browser which accepts a Remote Debug Port Connection over Web-Sockets.
Google-Chrome was used during the development process of the classes in this particular package. Lately, it has been asserted Microsoft has switched to using the Chrome Browser-Engine for its Microsoft Edge Internal Code-Base. Therefore, there may some functionality available when running the methods in this class with Microsoft-Edge.
Check whether the your Web-Browser will allow itself to be driven by theWeb-Socket RDP-Port 9223. See the examples available in packageTorello.Browserto undertand how to build aPageConnandBrowserConnWeb-Socket Connection, and how to build aWebSocketSenderinstance in order to execute the methods in this class.
Web-Socket & JSON API:
Every one of the methods that reside in this class are designed to do nothing more than:- Accept Parameters from the User, and "Marshall Them" into a Valid JSON-Request
- Transmit the Marshalled Request-JSON to a Headless Web-Browser over a Web-Socket Connection
- Receive BOTH that Command-Results AND any Browser Event-Firings from the Web-Socket
- Parse JSON Method-Results and Browser-Event Firings, and Subsequently Convert them to Standard Java-Types
- Report these Method-Results and Browser-Events to the User via a User-Registered, Event-Listener (Events) or a Promise Object (Command Responses / Results)
Unlike the bulk of the Java HTML JAR Library, there is very little native Java-Code, and very little testing that may be done on any of the classes & methods in this package. The code inside these classes does nothing more than marshall-and-unmarshall Java-Types into Json-Requests (and vice-versa). The Java-Script & Browser modules inside of a Google-Chrome instance are, theoretically, handling these requests, and returning their results (or events) over the Web-Socket Connection.
It has been asserted (by Google Chrome Developers) that some of these methods are only "partially working" or "experimental".
Asking Chat-GPT for Help:
The LLM otherwise known as "Chat-GPT" does, indeed, have an expert level of knowledge about the "Remote DevTools Protocol". The API that theChrome DevTools Protocl (CDP)exports is extremely well understood by the LLM, and generally I have found that Chat-GPT understands (by 2 or 3 orders of magnitude) better what my Auto-Generated JSON-Wrappers can do in controlling a Web-Browser than I could ever possibly hope to understand.
Though not available today, there will soon be an automatically downloadable Token-Stream (AI Embeddings) BUTTON available on my Java-Doc Pages that should hopefully make it extremely easy to post my code-base, RAG Style, to Chat-GPT and other LLM's when 'interogating' them. Presently, because my "Get Token Stream Button" does not exist yet on any of my pages, what you can do is copy-and-paste any Method-Signature from any one of these pages and then ask Chat-GPT to explain what that Browser or Java-Script Function is actually doing. It is very likely to give you some pretty neat answers.
I have found that every single one of the Domains, Types & Events which are offered by the CDP Protocol (though not documented very well by Google), are perfectly understood by the A.I. LLM - literally to the point where it does know (much better than I ever could) what my own code base actually does!
Try it out, it's a lot of fun. Note that this package and these classes were originally developed solely to be able to execute the Java-Script that a browser executes when visiting a Web-Site. Complete HTML-Page Content can be scraped (using the HTML Data-Scraping Tools in Java-HTML) off of Web-Sites that have dynamic / Java-Script Generated Content.
Conspicuous Boxed-Types Usage:
You may notice that there are many methods that have parameters which accept, for instance, anInteger, instead of a primitiveint. Just to remind the readiner, in Java Programs aBoxed Typeis a standard Java-Primitive which has been converted into an Object-Reference. The use of Boxed-Types in this code base is an easy-and-fast-way to allow for the concept of "Optional Parameters" or "Optional Field Value."
Whenever you see a method that accepts anInteger, the reason for this Parameter-Type choice is actually to allow a user to pass 'null' to it. This is a simple way to ELIDE passing any value at all to parameters which Google-Chrome would otherwise assert are "Optional." Whenever you pass 'null' to a Boxed-Types in this class, the Json-Processor will simply eliminate that Object-Property from the command altogether; and the browser will simply not receive any value for that parameter when that command is invoked.
The Java Language Specification does not have an easy or well defined means of accepting optional method parameters; so Boxed-Types and 'null' are utilized here. Note that 'null' may be passed to any Command Method-Parameter that is listed asOptionalon the Java-Doc Page description for that parameter.
Hi-Lited Source-Code:This File's Source Code:
- View Here: Torello/Browser/BrowserAPI/Overlay.java
- Open New Browser-Tab: Torello/Browser/BrowserAPI/Overlay.java
File Size: 98,419 Bytes Line Count: 2,396 '\n' Characters Found
Helper: Command Invocation Helpers
- View Here: Overlay$$Commands.java
- Open New Browser-Tab: Overlay$$Commands.java
File Size: 5,023 Bytes Line Count: 112 '\n' Characters Found
Stateless Class:This class neither contains any program-state, nor can it be instantiated. The@StaticFunctionalAnnotation may also be called 'The Spaghetti Report'.Static-Functionalclasses are, essentially, C-Styled Files, without any constructors or non-static member fields. It is a concept very similar to the Java-Bean's@StatelessAnnotation.
- 1 Constructor(s), 1 declared private, zero-argument constructor
- 32 Method(s), 32 declared static
- 4 Field(s), 4 declared static, 4 declared final
-
-
Nested Class Summary
Type Nested Classes: Types / Classes that Are Used & Exported by this Domain Modifier and Type Class Description static classOverlay.BoxStyleStyle information for drawing a box.static classOverlay.ContainerQueryContainerHighlightConfig[No Description Provided by Google]static classOverlay.ContainerQueryHighlightConfig[No Description Provided by Google]static classOverlay.FlexContainerHighlightConfigConfiguration data for the highlighting of Flex container elements.static classOverlay.FlexItemHighlightConfigConfiguration data for the highlighting of Flex item elements.static classOverlay.FlexNodeHighlightConfig[No Description Provided by Google]static classOverlay.GridHighlightConfigConfiguration data for the highlighting of Grid elements.static classOverlay.GridNodeHighlightConfigConfigurations for Persistent Grid Highlightstatic classOverlay.HighlightConfigConfiguration data for the highlighting of page elements.static classOverlay.HingeConfigConfiguration for dual screen hingestatic classOverlay.IsolatedElementHighlightConfig[No Description Provided by Google]static classOverlay.IsolationModeHighlightConfig[No Description Provided by Google]static classOverlay.LineStyleStyle information for drawing a line.static classOverlay.ScrollSnapContainerHighlightConfig[No Description Provided by Google]static classOverlay.ScrollSnapHighlightConfig[No Description Provided by Google]static classOverlay.SourceOrderConfigConfiguration data for drawing the source order of an elements children.static classOverlay.WindowControlsOverlayConfigConfiguration for Window Controls OverlayEvent Nested Classes: Browser Events, as Java Inner Classes, Which are Fired by this Domain Modifier and Type Class Description static classOverlay.inspectNodeRequestedFired when the node should be inspected.static classOverlay.nodeHighlightRequestedFired when the node should be highlighted.static classOverlay.screenshotRequestedFired when user asks to capture screenshot of some area on the page.
-
Field Summary
Enumerated Strings: Like Java 'enum' Types, but Converted to Read-Only String-Lists Modifier and Type Field Description static ReadOnlyList<String>ColorFormat[No Description Provided by Google]static ReadOnlyList<String>ContrastAlgorithm[No Description Provided by Google]static ReadOnlyList<String>InspectMode[No Description Provided by Google]Marker Events: Events without any Fields or Properties Modifier and Type Field Description static StringinspectModeCanceledFired when user cancels the inspect mode.
-
Method Summary
Overlay Domain Commands Script Returns Modifier and Type Method Voidstatic Script<>disable()
Disables domain notifications.Voidstatic Script<>enable()
Enables domain notifications.JsonValuestatic Script<>getGridHighlightObjectsForTest(int[] nodeIds)
For Persistent Grid testing.JsonValuestatic Script<>getHighlightObjectForTest(int nodeId, Boolean includeDistance, Boolean includeStyle, String colorFormat, Boolean showAccessibilityInfo)
For testing.JsonValuestatic Script<>getSourceOrderHighlightObjectForTest(int nodeId)
For Source Order Viewer testing.Voidstatic Script<>hideHighlight()
Hides any highlight.Voidstatic Script<>highlightFrame(String frameId, DOM.RGBA contentColor, DOM.RGBA contentOutlineColor)
Highlights owner element of the frame with given id.Voidstatic Script<>highlightNode(Overlay.HighlightConfig highlightConfig, Integer nodeId, Integer backendNodeId, String objectId, String selector)
Highlights DOM node with given id or with the given JavaScript object wrapper.Voidstatic Script<>highlightQuad(Number quad, DOM.RGBA color, DOM.RGBA outlineColor)
Highlights given quad.Voidstatic Script<>highlightRect(int x, int y, int width, int height, DOM.RGBA color, DOM.RGBA outlineColor)
Highlights given rectangle.Voidstatic Script<>highlightSourceOrder(Overlay.SourceOrderConfig sourceOrderConfig, Integer nodeId, Integer backendNodeId, String objectId)
Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper.Voidstatic Script<>setInspectMode(String mode, Overlay.HighlightConfig highlightConfig)
Enters the 'inspect' mode.Voidstatic Script<>setPausedInDebuggerMessage(String message)
[No Description Provided by Google]Voidstatic Script<>setShowAdHighlights(boolean show)
Highlights owner element of all frames detected to be ads.Voidstatic Script<>setShowContainerQueryOverlays(Overlay.ContainerQueryHighlightConfig[] containerQueryHighlightConfigs)
[No Description Provided by Google]Voidstatic Script<>setShowDebugBorders(boolean show)
Requests that backend shows debug borders on layersVoidstatic Script<>setShowFlexOverlays(Overlay.FlexNodeHighlightConfig[] flexNodeHighlightConfigs)
[No Description Provided by Google]Voidstatic Script<>setShowFPSCounter(boolean show)
Requests that backend shows the FPS counterVoidstatic Script<>setShowGridOverlays(Overlay.GridNodeHighlightConfig[] gridNodeHighlightConfigs)
Highlight multiple elements with the CSS Grid overlay.Voidstatic Script<>setShowHinge(Overlay.HingeConfig hingeConfig)
Add a dual screen device hingeVoidstatic Script<>setShowHitTestBorders(boolean show)
Deprecated, no longer has any effect.Voidstatic Script<>setShowIsolatedElements(Overlay.IsolatedElementHighlightConfig[] isolatedElementHighlightConfigs)
Show elements in isolation mode with overlays.Voidstatic Script<>setShowLayoutShiftRegions(boolean result)
Requests that backend shows layout shift regionsVoidstatic Script<>setShowPaintRects(boolean result)
Requests that backend shows paint rectanglesVoidstatic Script<>setShowScrollBottleneckRects(boolean show)
Requests that backend shows scroll bottleneck rectsVoidstatic Script<>setShowScrollSnapOverlays(Overlay.ScrollSnapHighlightConfig[] scrollSnapHighlightConfigs)
[No Description Provided by Google]Voidstatic Script<>setShowViewportSizeOnResize(boolean show)
Paints viewport size upon main frame resize.Voidstatic Script<>setShowWebVitals(boolean show)
Deprecated, no longer has any effect.Voidstatic Script<>setShowWindowControlsOverlay(Overlay.WindowControlsOverlayConfig windowControlsOverlayConfig)
Show Window Controls Overlay for PWAOverlay Domain CommandBuilder Methods Modifier and Type Method Description static CommandBuilder
<JsonValue>getHighlightObjectForTest()Creates a buider for conveniently assigning parameters to this method.static CommandBuilder
<Void>highlightNode()Creates a buider for conveniently assigning parameters to this method.static CommandBuilder
<Void>highlightRect()Creates a buider for conveniently assigning parameters to this method.
-
-
-
Field Detail
-
inspectModeCanceled
public static final java.lang.String inspectModeCanceled
Fired when user cancels the inspect mode.
This is Marker-Event. Marker-Event's are events that do not possess any data or fields at all. When such events are fired by the browser, the Web-Socket sends nothing more than the name of the event in the packet. The Java-HTML CDP Implementation (this library) has not actually created a dedicated Java Event-Type for this Browser Event.
This specificstaticfield is actually just declared aString.inspectModeCanceledhas not been 'reified' into an actual nested / inner class of its own, at all.
Eliminated Event Type- See Also:
- Constant Field Values
-
ColorFormat
public static final ReadOnlyList<java.lang.String> ColorFormat
[No Description Provided by Google]
String-Enumeration Type
-
ContrastAlgorithm
public static final ReadOnlyList<java.lang.String> ContrastAlgorithm
[No Description Provided by Google]
String-Enumeration Type
-
InspectMode
public static final ReadOnlyList<java.lang.String> InspectMode
[No Description Provided by Google]
String-Enumeration Type
-
-
Method Detail
-
disable
-
enable
-
getGridHighlightObjectsForTest
public static Script<JsonValue> getGridHighlightObjectsForTest (int[] nodeIds)
For Persistent Grid testing.- Parameters:
nodeIds- Ids of the node to get highlight object for.- Returns:
- An instance of
Script<JsonValue>
This script may be executed, usingScript.exec, and afterwards, aPromise<JsonValue>will be returned
Finally, thePromisemay be awaited, usingPromise.await(), and the returned result of this Browser Function may be retrieved.This Browser Function'sPromisereturns:JsonValue (highlights)
Grid Highlight data for the node ids provided.
-
getHighlightObjectForTest
public static Script<JsonValue> getHighlightObjectForTest (int nodeId, java.lang.Boolean includeDistance, java.lang.Boolean includeStyle, java.lang.String colorFormat, java.lang.Boolean showAccessibilityInfo)
For testing.👍 Because of the sheer number of input parameters to this method, there is a aCommandBuildervariant to this method which may be invoked instead.
Please View:getHighlightObjectForTest()- Parameters:
nodeId- Id of the node to get highlight object for.includeDistance- Whether to include distance info.
OPTIONALincludeStyle- Whether to include style info.
OPTIONALcolorFormat- The color format to get config with (default: hex).
OPTIONALshowAccessibilityInfo- Whether to show accessibility info (default: true).
OPTIONAL- Returns:
- An instance of
Script<JsonValue>
This script may be executed, usingScript.exec, and afterwards, aPromise<JsonValue>will be returned
Finally, thePromisemay be awaited, usingPromise.await(), and the returned result of this Browser Function may be retrieved.This Browser Function'sPromisereturns:JsonValue (highlight)
Highlight data for the node.
-
getSourceOrderHighlightObjectForTest
public static Script<JsonValue> getSourceOrderHighlightObjectForTest (int nodeId)
For Source Order Viewer testing.- Parameters:
nodeId- Id of the node to highlight.- Returns:
- An instance of
Script<JsonValue>
This script may be executed, usingScript.exec, and afterwards, aPromise<JsonValue>will be returned
Finally, thePromisemay be awaited, usingPromise.await(), and the returned result of this Browser Function may be retrieved.This Browser Function'sPromisereturns:JsonValue (highlight)
Source order highlight data for the node id provided.
-
hideHighlight
public static Script<java.lang.Void> hideHighlight()
Hides any highlight.
-
highlightFrame
public static Script<java.lang.Void> highlightFrame (java.lang.String frameId, DOM.RGBA contentColor, DOM.RGBA contentOutlineColor)
Highlights owner element of the frame with given id. Deprecated: Doesn't work reliably and cannot be fixed due to process separation (the owner node might be in a different process). Determine the owner node in the client and use highlightNode.
DEPRECATED- Parameters:
frameId- Identifier of the frame to highlight.contentColor- The content box highlight fill color (default: transparent).
OPTIONALcontentOutlineColor- The content box highlight outline color (default: transparent).
OPTIONAL- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
highlightNode
public static Script<java.lang.Void> highlightNode (Overlay.HighlightConfig highlightConfig, java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectId, java.lang.String selector)
Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.👍 Because of the sheer number of input parameters to this method, there is a aCommandBuildervariant to this method which may be invoked instead.
Please View:highlightNode()- Parameters:
highlightConfig- A descriptor for the highlight appearance.nodeId- Identifier of the node to highlight.
OPTIONALbackendNodeId- Identifier of the backend node to highlight.
OPTIONALobjectId- JavaScript object id of the node to be highlighted.
OPTIONALselector- Selectors to highlight relevant nodes.
OPTIONAL- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
highlightQuad
public static Script<java.lang.Void> highlightQuad(java.lang.Number quad, DOM.RGBA color, DOM.RGBA outlineColor)
Highlights given quad. Coordinates are absolute with respect to the main frame viewport.- Parameters:
quad- Quad to highlightcolor- The highlight fill color (default: transparent).
OPTIONALoutlineColor- The highlight outline color (default: transparent).
OPTIONAL- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
highlightRect
public static Script<java.lang.Void> highlightRect(int x, int y, int width, int height, DOM.RGBA color, DOM.RGBA outlineColor)
Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.👍 Because of the sheer number of input parameters to this method, there is a aCommandBuildervariant to this method which may be invoked instead.
Please View:highlightRect()- Parameters:
x- X coordinatey- Y coordinatewidth- Rectangle widthheight- Rectangle heightcolor- The highlight fill color (default: transparent).
OPTIONALoutlineColor- The highlight outline color (default: transparent).
OPTIONAL- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
highlightSourceOrder
public static Script<java.lang.Void> highlightSourceOrder (Overlay.SourceOrderConfig sourceOrderConfig, java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectId)
Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.- Parameters:
sourceOrderConfig- A descriptor for the appearance of the overlay drawing.nodeId- Identifier of the node to highlight.
OPTIONALbackendNodeId- Identifier of the backend node to highlight.
OPTIONALobjectId- JavaScript object id of the node to be highlighted.
OPTIONAL- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setInspectMode
public static Script<java.lang.Void> setInspectMode (java.lang.String mode, Overlay.HighlightConfig highlightConfig)
Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.- Parameters:
mode- Set an inspection mode.highlightConfig- A descriptor for the highlight appearance of hovered-over nodes. May be omitted ifenabled == false.
OPTIONAL- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setPausedInDebuggerMessage
public static Script<java.lang.Void> setPausedInDebuggerMessage (java.lang.String message)
[No Description Provided by Google]- Parameters:
message- The message to display, also triggers resume and step over controls.
OPTIONAL- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowAdHighlights
public static Script<java.lang.Void> setShowAdHighlights(boolean show)
Highlights owner element of all frames detected to be ads.- Parameters:
show- True for showing ad highlights- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowContainerQueryOverlays
public static Script<java.lang.Void> setShowContainerQueryOverlays (Overlay.ContainerQueryHighlightConfig[] containerQueryHighlightConfigs)
[No Description Provided by Google]- Parameters:
containerQueryHighlightConfigs- An array of node identifiers and descriptors for the highlight appearance.- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowDebugBorders
public static Script<java.lang.Void> setShowDebugBorders(boolean show)
Requests that backend shows debug borders on layers- Parameters:
show- True for showing debug borders- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowFPSCounter
public static Script<java.lang.Void> setShowFPSCounter(boolean show)
Requests that backend shows the FPS counter- Parameters:
show- True for showing the FPS counter- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowFlexOverlays
public static Script<java.lang.Void> setShowFlexOverlays (Overlay.FlexNodeHighlightConfig[] flexNodeHighlightConfigs)
[No Description Provided by Google]- Parameters:
flexNodeHighlightConfigs- An array of node identifiers and descriptors for the highlight appearance.- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowGridOverlays
public static Script<java.lang.Void> setShowGridOverlays (Overlay.GridNodeHighlightConfig[] gridNodeHighlightConfigs)
Highlight multiple elements with the CSS Grid overlay.- Parameters:
gridNodeHighlightConfigs- An array of node identifiers and descriptors for the highlight appearance.- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowHinge
public static Script<java.lang.Void> setShowHinge (Overlay.HingeConfig hingeConfig)
Add a dual screen device hinge- Parameters:
hingeConfig- hinge data, null means hideHinge
OPTIONAL- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowHitTestBorders
public static Script<java.lang.Void> setShowHitTestBorders(boolean show)
Deprecated, no longer has any effect.
DEPRECATED- Parameters:
show- True for showing hit-test borders- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowIsolatedElements
public static Script<java.lang.Void> setShowIsolatedElements (Overlay.IsolatedElementHighlightConfig[] isolatedElementHighlightConfigs)
Show elements in isolation mode with overlays.- Parameters:
isolatedElementHighlightConfigs- An array of node identifiers and descriptors for the highlight appearance.- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowLayoutShiftRegions
public static Script<java.lang.Void> setShowLayoutShiftRegions (boolean result)
Requests that backend shows layout shift regions- Parameters:
result- True for showing layout shift regions- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowPaintRects
public static Script<java.lang.Void> setShowPaintRects(boolean result)
Requests that backend shows paint rectangles- Parameters:
result- True for showing paint rectangles- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowScrollBottleneckRects
public static Script<java.lang.Void> setShowScrollBottleneckRects (boolean show)
Requests that backend shows scroll bottleneck rects- Parameters:
show- True for showing scroll bottleneck rects- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowScrollSnapOverlays
public static Script<java.lang.Void> setShowScrollSnapOverlays (Overlay.ScrollSnapHighlightConfig[] scrollSnapHighlightConfigs)
[No Description Provided by Google]- Parameters:
scrollSnapHighlightConfigs- An array of node identifiers and descriptors for the highlight appearance.- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowViewportSizeOnResize
public static Script<java.lang.Void> setShowViewportSizeOnResize (boolean show)
Paints viewport size upon main frame resize.- Parameters:
show- Whether to paint size or not.- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowWebVitals
public static Script<java.lang.Void> setShowWebVitals(boolean show)
Deprecated, no longer has any effect.
DEPRECATED- Parameters:
show- -- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
setShowWindowControlsOverlay
public static Script<java.lang.Void> setShowWindowControlsOverlay (Overlay.WindowControlsOverlayConfig windowControlsOverlayConfig)
Show Window Controls Overlay for PWA- Parameters:
windowControlsOverlayConfig- Window Controls Overlay data, null means hide Window Controls Overlay
OPTIONAL- Returns:
- An instance of
Script<Void>
ThisScriptinstance must be executed before the browser receives the invocation-request.This Browser-Function does not have a return-value. You may choose to await thePromise<Void>to ensure that the Browser Function has run to completion.
-
getHighlightObjectForTest
public static CommandBuilder<JsonValue> getHighlightObjectForTest()
Creates a buider for conveniently assigning parameters to this method.Note that the original method expects 5 parameters, and can be cumbersome.- Returns:
CommandBuilderinstance, for assigning parameter values, one by one.- See Also:
getHighlightObjectForTest(int, java.lang.Boolean, java.lang.Boolean, java.lang.String, java.lang.Boolean)
-
highlightNode
public static CommandBuilder<java.lang.Void> highlightNode()
Creates a buider for conveniently assigning parameters to this method.Note that the original method expects 5 parameters, and can be cumbersome.- Returns:
CommandBuilderinstance, for assigning parameter values, one by one.- See Also:
highlightNode(Torello.Browser.BrowserAPI.Overlay.HighlightConfig, java.lang.Integer, java.lang.Integer, java.lang.String, java.lang.String)
-
highlightRect
public static CommandBuilder<java.lang.Void> highlightRect()
Creates a buider for conveniently assigning parameters to this method.Note that the original method expects 6 parameters, and can be cumbersome.- Returns:
CommandBuilderinstance, for assigning parameter values, one by one.- See Also:
highlightRect(int, int, int, int, Torello.Browser.BrowserAPI.DOM.RGBA, Torello.Browser.BrowserAPI.DOM.RGBA)
-
-