Represents a DOM mutation event from add_dom_mutation_handler. Attributes: element_id: The ``data-__webdriver_id`` attribute value set on the mutated element by the MutationObserver. Use this to locate the element from the main thread if needed. For ``characterD
| 239 | |
| 240 | @dataclass |
| 241 | class DomMutation: |
| 242 | """Represents a DOM mutation event from add_dom_mutation_handler. |
| 243 | |
| 244 | Attributes: |
| 245 | element_id: The ``data-__webdriver_id`` attribute value set on the |
| 246 | mutated element by the MutationObserver. Use this to locate the |
| 247 | element from the main thread if needed. For ``characterData`` |
| 248 | mutations this identifies the parent element of the text node. |
| 249 | attribute_name: The name of the changed attribute (``attributes`` |
| 250 | mutations only). |
| 251 | current_value: The value after the mutation (attribute value or |
| 252 | character data; ``None`` if the attribute was removed). |
| 253 | old_value: The value before the mutation. |
| 254 | type: The mutation type: ``attributes``, ``childList`` or |
| 255 | ``characterData``. |
| 256 | target: Same identifier as ``element_id``; named per the |
| 257 | cross-binding BiDi API design. |
| 258 | added_nodes: Node descriptors added by a ``childList`` mutation. |
| 259 | Element descriptors carry ``nodeType``/``nodeName``/``id`` |
| 260 | (a ``data-__webdriver_id`` value); other nodes carry |
| 261 | ``nodeType``/``nodeName``/``value``. |
| 262 | removed_nodes: Node descriptors removed by a ``childList`` mutation. |
| 263 | """ |
| 264 | |
| 265 | element_id: str | None = None |
| 266 | attribute_name: str | None = None |
| 267 | current_value: str | None = None |
| 268 | old_value: str | None = None |
| 269 | type: str | None = None |
| 270 | target: str | None = None |
| 271 | added_nodes: list[Any] = field(default_factory=list) |
| 272 | removed_nodes: list[Any] = field(default_factory=list) |
| 273 | |
| 274 | |
| 275 | def _stack_frames(stack_trace: Any) -> list[dict]: |
no test coverage detected