pub struct AccessibilityClient { /* private fields */ }Expand description
Client for Accessibility domain commands.
Implementations§
Source§impl AccessibilityClient
impl AccessibilityClient
Sourcepub async fn disable(&self, session_id: Option<&str>) -> Result<Value, CdpError>
pub async fn disable(&self, session_id: Option<&str>) -> Result<Value, CdpError>
Disables the accessibility domain.
Sourcepub async fn enable(&self, session_id: Option<&str>) -> Result<Value, CdpError>
pub async fn enable(&self, session_id: Option<&str>) -> Result<Value, CdpError>
Enables the accessibility domain which causes AXNodeIds to remain consistent between method calls.
This turns on accessibility for the page, which can impact performance until accessibility is disabled.
Sourcepub async fn get_partial_ax_tree(
&self,
params: GetPartialAxTreeParams,
session_id: Option<&str>,
) -> Result<GetPartialAxTreeReturns, CdpError>
pub async fn get_partial_ax_tree( &self, params: GetPartialAxTreeParams, session_id: Option<&str>, ) -> Result<GetPartialAxTreeReturns, CdpError>
Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
Sourcepub async fn get_full_ax_tree(
&self,
params: GetFullAxTreeParams,
session_id: Option<&str>,
) -> Result<GetFullAxTreeReturns, CdpError>
pub async fn get_full_ax_tree( &self, params: GetFullAxTreeParams, session_id: Option<&str>, ) -> Result<GetFullAxTreeReturns, CdpError>
Fetches the entire accessibility tree for the root Document
Sourcepub async fn get_root_ax_node(
&self,
params: GetRootAxNodeParams,
session_id: Option<&str>,
) -> Result<GetRootAxNodeReturns, CdpError>
pub async fn get_root_ax_node( &self, params: GetRootAxNodeParams, session_id: Option<&str>, ) -> Result<GetRootAxNodeReturns, CdpError>
Fetches the root node.
Requires enable() to have been called previously.
Sourcepub async fn get_ax_node_and_ancestors(
&self,
params: GetAxNodeAndAncestorsParams,
session_id: Option<&str>,
) -> Result<GetAxNodeAndAncestorsReturns, CdpError>
pub async fn get_ax_node_and_ancestors( &self, params: GetAxNodeAndAncestorsParams, session_id: Option<&str>, ) -> Result<GetAxNodeAndAncestorsReturns, CdpError>
Fetches a node and all ancestors up to and including the root.
Requires enable() to have been called previously.
Sourcepub async fn get_child_ax_nodes(
&self,
params: GetChildAxNodesParams,
session_id: Option<&str>,
) -> Result<GetChildAxNodesReturns, CdpError>
pub async fn get_child_ax_nodes( &self, params: GetChildAxNodesParams, session_id: Option<&str>, ) -> Result<GetChildAxNodesReturns, CdpError>
Fetches a particular accessibility node by AXNodeId.
Requires enable() to have been called previously.
Sourcepub async fn query_ax_tree(
&self,
params: QueryAxTreeParams,
session_id: Option<&str>,
) -> Result<QueryAxTreeReturns, CdpError>
pub async fn query_ax_tree( &self, params: QueryAxTreeParams, session_id: Option<&str>, ) -> Result<QueryAxTreeReturns, CdpError>
Query a DOM node’s accessibility subtree for accessible name and role.
This command computes the name and role for all nodes in the subtree, including those that are
ignored for accessibility, and returns those that match the specified name and role. If no DOM
node is specified, or the DOM node does not exist, the command returns an error. If neither
accessibleName or role is specified, it returns all the accessibility nodes in the subtree.