Package io.webfolder.cdp.command
Interface AuditsAsync
public interface AuditsAsync
Audits domain allows investigation of page violations and possible improvements.
-
Method Summary
Modifier and TypeMethodDescriptionRuns the contrast check for the target page.checkContrast
(Boolean reportAAA) Runs the contrast check for the target page.disable()
Disables issues domain, prevents further issues from being reported to the client.enable()
Enables issues domain, sends the issues collected so far to the client by means of the issueAdded event.getEncodedResponse
(String requestId, Encoding encoding) Returns the response body and size if it were re-encoded with the specified settings.getEncodedResponse
(String requestId, Encoding encoding, Double quality, Boolean sizeOnly) Returns the response body and size if it were re-encoded with the specified settings.
-
Method Details
-
checkContrast
CompletableFuture<Void> checkContrast()Runs the contrast check for the target page. Found issues are reported using Audits.issueAdded event. -
checkContrast
Runs the contrast check for the target page. Found issues are reported using Audits.issueAdded event.- Parameters:
reportAAA
- Whether to report WCAG AAA level issues. Default is false.
-
disable
CompletableFuture<Void> disable()Disables issues domain, prevents further issues from being reported to the client. -
enable
CompletableFuture<Void> enable()Enables issues domain, sends the issues collected so far to the client by means of the issueAdded event. -
getEncodedResponse
Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.- Parameters:
requestId
- Identifier of the network request to get content for.encoding
- The encoding to use.- Returns:
- GetEncodedResponseResult
-
getEncodedResponse
CompletableFuture<GetEncodedResponseResult> getEncodedResponse(String requestId, Encoding encoding, Double quality, Boolean sizeOnly) Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.- Parameters:
requestId
- Identifier of the network request to get content for.encoding
- The encoding to use.quality
- The quality of the encoding (0-1). (defaults to 1)sizeOnly
- Whether to only return the size information (defaults to false).- Returns:
- GetEncodedResponseResult
-