Constructor
new AccessibilitySnapshotter(drivernon-null, elementFactory)
| Name | Type | Description |
|---|---|---|
driver | WebDriver | The driver to snapshot through. |
elementFactory | function | Makes the element for a shared id. |
Methods
(async) contexts_()
The window's browsing contexts, top-level first, then each frame depth-first.
(async) snapshot(rootnullable, optionsopt) → (non-null) {Promise.<!AccessibilityNode>}
Snapshots the driver's current browsing context, or the subtree under root.
| Name | Type | Attributes | Description |
|---|---|---|---|
root | WebElement | <nullable> | The element whose subtree to snapshot, or null for the document of the driver's current browsing context: the top-level document, or the frame the driver has switched into. |
options | Object | <optional> | With |
When
rootno longer belongs to a document.- Type
- error.
StaleElementReferenceError
The snapshot, with every reachable child frame's tree attached under its iframe node. The driver's current browsing context is left as it was.
- Type:
- Promise.<!AccessibilityNode>