accessibility
AXNode
dataclass
A node in the accessibility tree.
Source code in zendriver/cdp/accessibility.py
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
|
backend_dom_node_id: typing.Optional[dom.BackendNodeId] = None
class-attribute
instance-attribute
child_ids: typing.Optional[typing.List[AXNodeId]] = None
class-attribute
instance-attribute
chrome_role: typing.Optional[AXValue] = None
class-attribute
instance-attribute
description: typing.Optional[AXValue] = None
class-attribute
instance-attribute
frame_id: typing.Optional[page.FrameId] = None
class-attribute
instance-attribute
ignored: bool
instance-attribute
ignored_reasons: typing.Optional[typing.List[AXProperty]] = None
class-attribute
instance-attribute
name: typing.Optional[AXValue] = None
class-attribute
instance-attribute
node_id: AXNodeId
instance-attribute
parent_id: typing.Optional[AXNodeId] = None
class-attribute
instance-attribute
properties: typing.Optional[typing.List[AXProperty]] = None
class-attribute
instance-attribute
role: typing.Optional[AXValue] = None
class-attribute
instance-attribute
value: typing.Optional[AXValue] = None
class-attribute
instance-attribute
__init__(node_id, ignored, ignored_reasons=None, role=None, chrome_role=None, name=None, description=None, value=None, properties=None, parent_id=None, child_ids=None, backend_dom_node_id=None, frame_id=None)
from_json(json)
classmethod
Source code in zendriver/cdp/accessibility.py
to_json()
Source code in zendriver/cdp/accessibility.py
AXNodeId
Bases: str
Unique accessibility node identifier.
Source code in zendriver/cdp/accessibility.py
__repr__()
from_json(json)
classmethod
AXProperty
dataclass
Source code in zendriver/cdp/accessibility.py
name: AXPropertyName
instance-attribute
value: AXValue
instance-attribute
__init__(name, value)
from_json(json)
classmethod
AXPropertyName
Bases: Enum
Values of AXProperty name: - from 'busy' to 'roledescription': states which apply to every AX node - from 'live' to 'root': attributes which apply to nodes in live regions - from 'autocomplete' to 'valuetext': attributes which apply to widgets - from 'checked' to 'selected': states which apply to widgets - from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.
Source code in zendriver/cdp/accessibility.py
ACTIONS = 'actions'
class-attribute
instance-attribute
ACTIVEDESCENDANT = 'activedescendant'
class-attribute
instance-attribute
ATOMIC = 'atomic'
class-attribute
instance-attribute
AUTOCOMPLETE = 'autocomplete'
class-attribute
instance-attribute
BUSY = 'busy'
class-attribute
instance-attribute
CHECKED = 'checked'
class-attribute
instance-attribute
CONTROLS = 'controls'
class-attribute
instance-attribute
DESCRIBEDBY = 'describedby'
class-attribute
instance-attribute
DETAILS = 'details'
class-attribute
instance-attribute
DISABLED = 'disabled'
class-attribute
instance-attribute
EDITABLE = 'editable'
class-attribute
instance-attribute
ERRORMESSAGE = 'errormessage'
class-attribute
instance-attribute
EXPANDED = 'expanded'
class-attribute
instance-attribute
FLOWTO = 'flowto'
class-attribute
instance-attribute
FOCUSABLE = 'focusable'
class-attribute
instance-attribute
FOCUSED = 'focused'
class-attribute
instance-attribute
HAS_POPUP = 'hasPopup'
class-attribute
instance-attribute
HIDDEN = 'hidden'
class-attribute
instance-attribute
HIDDEN_ROOT = 'hiddenRoot'
class-attribute
instance-attribute
INVALID = 'invalid'
class-attribute
instance-attribute
KEYSHORTCUTS = 'keyshortcuts'
class-attribute
instance-attribute
LABELLEDBY = 'labelledby'
class-attribute
instance-attribute
LEVEL = 'level'
class-attribute
instance-attribute
LIVE = 'live'
class-attribute
instance-attribute
MODAL = 'modal'
class-attribute
instance-attribute
MULTILINE = 'multiline'
class-attribute
instance-attribute
MULTISELECTABLE = 'multiselectable'
class-attribute
instance-attribute
ORIENTATION = 'orientation'
class-attribute
instance-attribute
OWNS = 'owns'
class-attribute
instance-attribute
PRESSED = 'pressed'
class-attribute
instance-attribute
READONLY = 'readonly'
class-attribute
instance-attribute
RELEVANT = 'relevant'
class-attribute
instance-attribute
REQUIRED = 'required'
class-attribute
instance-attribute
ROLEDESCRIPTION = 'roledescription'
class-attribute
instance-attribute
ROOT = 'root'
class-attribute
instance-attribute
SELECTED = 'selected'
class-attribute
instance-attribute
SETTABLE = 'settable'
class-attribute
instance-attribute
URL = 'url'
class-attribute
instance-attribute
VALUEMAX = 'valuemax'
class-attribute
instance-attribute
VALUEMIN = 'valuemin'
class-attribute
instance-attribute
VALUETEXT = 'valuetext'
class-attribute
instance-attribute
from_json(json)
classmethod
AXRelatedNode
dataclass
Source code in zendriver/cdp/accessibility.py
backend_dom_node_id: dom.BackendNodeId
instance-attribute
idref: typing.Optional[str] = None
class-attribute
instance-attribute
text: typing.Optional[str] = None
class-attribute
instance-attribute
__init__(backend_dom_node_id, idref=None, text=None)
from_json(json)
classmethod
Source code in zendriver/cdp/accessibility.py
to_json()
Source code in zendriver/cdp/accessibility.py
AXValue
dataclass
A single computed AX property.
Source code in zendriver/cdp/accessibility.py
related_nodes: typing.Optional[typing.List[AXRelatedNode]] = None
class-attribute
instance-attribute
sources: typing.Optional[typing.List[AXValueSource]] = None
class-attribute
instance-attribute
type_: AXValueType
instance-attribute
value: typing.Optional[typing.Any] = None
class-attribute
instance-attribute
__init__(type_, value=None, related_nodes=None, sources=None)
from_json(json)
classmethod
Source code in zendriver/cdp/accessibility.py
to_json()
Source code in zendriver/cdp/accessibility.py
AXValueNativeSourceType
Bases: Enum
Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
Source code in zendriver/cdp/accessibility.py
DESCRIPTION = 'description'
class-attribute
instance-attribute
FIGCAPTION = 'figcaption'
class-attribute
instance-attribute
LABEL = 'label'
class-attribute
instance-attribute
LABELFOR = 'labelfor'
class-attribute
instance-attribute
LABELWRAPPED = 'labelwrapped'
class-attribute
instance-attribute
LEGEND = 'legend'
class-attribute
instance-attribute
OTHER = 'other'
class-attribute
instance-attribute
RUBYANNOTATION = 'rubyannotation'
class-attribute
instance-attribute
TABLECAPTION = 'tablecaption'
class-attribute
instance-attribute
TITLE = 'title'
class-attribute
instance-attribute
from_json(json)
classmethod
AXValueSource
dataclass
A single source for a computed AX property.
Source code in zendriver/cdp/accessibility.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
attribute: typing.Optional[str] = None
class-attribute
instance-attribute
attribute_value: typing.Optional[AXValue] = None
class-attribute
instance-attribute
invalid: typing.Optional[bool] = None
class-attribute
instance-attribute
invalid_reason: typing.Optional[str] = None
class-attribute
instance-attribute
native_source: typing.Optional[AXValueNativeSourceType] = None
class-attribute
instance-attribute
native_source_value: typing.Optional[AXValue] = None
class-attribute
instance-attribute
superseded: typing.Optional[bool] = None
class-attribute
instance-attribute
type_: AXValueSourceType
instance-attribute
value: typing.Optional[AXValue] = None
class-attribute
instance-attribute
__init__(type_, value=None, attribute=None, attribute_value=None, superseded=None, native_source=None, native_source_value=None, invalid=None, invalid_reason=None)
from_json(json)
classmethod
Source code in zendriver/cdp/accessibility.py
to_json()
Source code in zendriver/cdp/accessibility.py
AXValueSourceType
Bases: Enum
Enum of possible property sources.
Source code in zendriver/cdp/accessibility.py
ATTRIBUTE = 'attribute'
class-attribute
instance-attribute
CONTENTS = 'contents'
class-attribute
instance-attribute
IMPLICIT = 'implicit'
class-attribute
instance-attribute
PLACEHOLDER = 'placeholder'
class-attribute
instance-attribute
RELATED_ELEMENT = 'relatedElement'
class-attribute
instance-attribute
STYLE = 'style'
class-attribute
instance-attribute
from_json(json)
classmethod
AXValueType
Bases: Enum
Enum of possible property types.
Source code in zendriver/cdp/accessibility.py
BOOLEAN = 'boolean'
class-attribute
instance-attribute
BOOLEAN_OR_UNDEFINED = 'booleanOrUndefined'
class-attribute
instance-attribute
COMPUTED_STRING = 'computedString'
class-attribute
instance-attribute
DOM_RELATION = 'domRelation'
class-attribute
instance-attribute
IDREF = 'idref'
class-attribute
instance-attribute
IDREF_LIST = 'idrefList'
class-attribute
instance-attribute
INTEGER = 'integer'
class-attribute
instance-attribute
INTERNAL_ROLE = 'internalRole'
class-attribute
instance-attribute
NODE = 'node'
class-attribute
instance-attribute
NODE_LIST = 'nodeList'
class-attribute
instance-attribute
NUMBER = 'number'
class-attribute
instance-attribute
ROLE = 'role'
class-attribute
instance-attribute
STRING = 'string'
class-attribute
instance-attribute
TOKEN = 'token'
class-attribute
instance-attribute
TOKEN_LIST = 'tokenList'
class-attribute
instance-attribute
TRISTATE = 'tristate'
class-attribute
instance-attribute
VALUE_UNDEFINED = 'valueUndefined'
class-attribute
instance-attribute
from_json(json)
classmethod
LoadComplete
dataclass
EXPERIMENTAL
The loadComplete event mirrors the load complete event sent by the browser to assistive technology when the web page has finished loading.
Source code in zendriver/cdp/accessibility.py
NodesUpdated
dataclass
EXPERIMENTAL
The nodesUpdated event is sent every time a previously requested node has changed the in tree.
Source code in zendriver/cdp/accessibility.py
disable()
Disables the accessibility domain.
enable()
Enables the accessibility domain which causes AXNodeId
's to remain consistent between method calls.
This turns on accessibility for the page, which can impact performance until accessibility is disabled.
Source code in zendriver/cdp/accessibility.py
get_ax_node_and_ancestors(node_id=None, backend_node_id=None, object_id=None)
Fetches a node and all ancestors up to and including the root.
Requires enable()
to have been called previously.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_id
|
Optional[NodeId]
|
(Optional) Identifier of the node to get. |
None
|
backend_node_id
|
Optional[BackendNodeId]
|
(Optional) Identifier of the backend node to get. |
None
|
object_id
|
Optional[RemoteObjectId]
|
(Optional) JavaScript object id of the node wrapper to get. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[AXNode]]
|
|
Source code in zendriver/cdp/accessibility.py
get_child_ax_nodes(id_, frame_id=None)
Fetches a particular accessibility node by AXNodeId.
Requires enable()
to have been called previously.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_
|
AXNodeId
|
|
required |
frame_id
|
Optional[FrameId]
|
(Optional) The frame in whose document the node resides. If omitted, the root frame is used. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[AXNode]]
|
|
Source code in zendriver/cdp/accessibility.py
get_full_ax_tree(depth=None, frame_id=None)
Fetches the entire accessibility tree for the root Document
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
depth
|
Optional[int]
|
(Optional) The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned. |
None
|
frame_id
|
Optional[FrameId]
|
(Optional) The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[AXNode]]
|
|
Source code in zendriver/cdp/accessibility.py
get_partial_ax_tree(node_id=None, backend_node_id=None, object_id=None, fetch_relatives=None)
Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_id
|
Optional[NodeId]
|
(Optional) Identifier of the node to get the partial accessibility tree for. |
None
|
backend_node_id
|
Optional[BackendNodeId]
|
(Optional) Identifier of the backend node to get the partial accessibility tree for. |
None
|
object_id
|
Optional[RemoteObjectId]
|
(Optional) JavaScript object id of the node wrapper to get the partial accessibility tree for. |
None
|
fetch_relatives
|
Optional[bool]
|
(Optional) Whether to fetch this node's ancestors, siblings and children. Defaults to true. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[AXNode]]
|
The |
Source code in zendriver/cdp/accessibility.py
get_root_ax_node(frame_id=None)
Fetches the root node.
Requires enable()
to have been called previously.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame_id
|
Optional[FrameId]
|
(Optional) The frame in whose document the node resides. If omitted, the root frame is used. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, AXNode]
|
|
Source code in zendriver/cdp/accessibility.py
query_ax_tree(node_id=None, backend_node_id=None, object_id=None, accessible_name=None, role=None)
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.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_id
|
Optional[NodeId]
|
(Optional) Identifier of the node for the root to query. |
None
|
backend_node_id
|
Optional[BackendNodeId]
|
(Optional) Identifier of the backend node for the root to query. |
None
|
object_id
|
Optional[RemoteObjectId]
|
(Optional) JavaScript object id of the node wrapper for the root to query. |
None
|
accessible_name
|
Optional[str]
|
(Optional) Find nodes with this computed name. |
None
|
role
|
Optional[str]
|
(Optional) Find nodes with this computed role. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[AXNode]]
|
A list of |