a
    $ñ»jÉe  ã                   @  sä  d dl mZ d dlZd dlZd dlmZ ddlmZmZ ddl	m
Z
 ddl	mZ ddl	mZ G d	d
„ d
eƒZG dd„ dejƒZG dd„ dejƒZG dd„ dejƒZeG dd„ dƒƒZeG dd„ dƒƒZeG dd„ dƒƒZeG dd„ dƒƒZG dd„ dejƒZeG dd„ dƒƒZddœdd „Zddœd!d"„ZdDd#d$d%d&d'd(œd)d*„ZdEd+d,d'd-œd.d/„ZdFd,d0d1œd2d3„ZdGd#d$d%d'd4œd5d6„ZdHd
d,d'd7œd8d9„ZdId#d$d%d:d:d'd;œd<d=„Z ed>ƒeG d?d@„ d@ƒƒƒZ!edAƒeG dBdC„ dCƒƒƒZ"dS )Jé    )ÚannotationsN)Ú	dataclassé   )Úevent_classÚT_JSON_DICT)Údom)Úpage)Úruntimec                      sB   e Zd ZdZddœdd„Zedd dœdd„ƒZ‡ fd	d
„Z‡  ZS )ÚAXNodeIdz%Unique accessibility node identifier.Ústr©Úreturnc                 C  s   | S ©N© ©Úselfr   r   ú9E:\soccer\ml_env\Lib\site-packages\mycdp/accessibility.pyÚto_json   s    zAXNodeId.to_json©Újsonr   c                 C  s   | |ƒS r   r   ©Úclsr   r   r   r   Ú	from_json   s    zAXNodeId.from_jsonc                   s   d  tƒ  ¡ ¡S )NzAXNodeId({}))ÚformatÚsuperÚ__repr__r   ©Ú	__class__r   r   r      s    zAXNodeId.__repr__)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úclassmethodr   r   Ú__classcell__r   r   r   r   r
      s
   r
   c                   @  sv   e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZddœdd„Zedd dœdd„ƒZdS )ÚAXValueTypez Enum of possible property types.ÚbooleanZtristateZbooleanOrUndefinedÚidrefZ	idrefListÚintegerÚnodeZnodeListÚnumberÚstringZcomputedStringÚtokenZ	tokenListZdomRelationÚroleZinternalRoleZvalueUndefinedr   r   c                 C  s   | j S r   ©Úvaluer   r   r   r   r   4   s    zAXValueType.to_jsonr   c                 C  s   | |ƒS r   r   r   r   r   r   r   7   s    zAXValueType.from_jsonN)r   r   r    r!   ÚBOOLEANZTRISTATEZBOOLEAN_OR_UNDEFINEDZIDREFZ
IDREF_LISTZINTEGERZNODEZ	NODE_LISTÚNUMBERÚSTRINGZCOMPUTED_STRINGZTOKENZ
TOKEN_LISTZDOM_RELATIONZROLEZINTERNAL_ROLEZVALUE_UNDEFINEDr   r"   r   r   r   r   r   r$       s*   r$   c                   @  sJ   e Zd ZdZdZdZdZdZdZdZ	dd	œd
d„Z
edd dœdd„ƒZdS )ÚAXValueSourceTypez"Enum of possible property sources.Ú	attributeZimplicitÚstyleÚcontentsÚplaceholderZrelatedElementr   r   c                 C  s   | j S r   r-   r   r   r   r   r   E   s    zAXValueSourceType.to_jsonr   c                 C  s   | |ƒS r   r   r   r   r   r   r   H   s    zAXValueSourceType.from_jsonN)r   r   r    r!   Z	ATTRIBUTEZIMPLICITZSTYLEZCONTENTSZPLACEHOLDERZRELATED_ELEMENTr   r"   r   r   r   r   r   r2   <   s   r2   c                   @  sZ   e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZddœdd„Zedd dœdd„ƒZdS )ÚAXValueNativeSourceTypezh
    Enum of possible native property sources
    (as a subtype of a particular AXValueSourceType).
    ÚdescriptionZ
figcaptionÚlabelZlabelforZlabelwrappedZlegendZrubyannotationZtablecaptionÚtitleÚotherr   r   c                 C  s   | j S r   r-   r   r   r   r   r   ]   s    zAXValueNativeSourceType.to_jsonr   c                 C  s   | |ƒS r   r   r   r   r   r   r   `   s    z!AXValueNativeSourceType.from_jsonN)r   r   r    r!   ZDESCRIPTIONZ
FIGCAPTIONZLABELZLABELFORZLABELWRAPPEDZLEGENDZRUBYANNOTATIONZTABLECAPTIONZTITLEÚOTHERr   r"   r   r   r   r   r   r7   M   s   r7   c                   @  sœ   e Zd ZU dZded< dZded< dZded< dZded	< dZd
ed< dZ	ded< dZ
ded< dZd
ed< dZded< ddœdd„Zedd dœdd„ƒZdS )ÚAXValueSourcez+A single source for a computed AX property.r2   Útype_Nútyping.Optional[AXValue]r.   útyping.Optional[str]r3   Úattribute_valueútyping.Optional[bool]Ú
supersededz(typing.Optional[AXValueNativeSourceType]Únative_sourceÚnative_source_valueÚinvalidÚinvalid_reasonr   r   c                 C  sÈ   t ƒ }| j ¡ |d< | jd ur,| j ¡ |d< | jd ur@| j|d< | jd urX| j ¡ |d< | jd url| j|d< | jd ur„| j ¡ |d< | jd urœ| j ¡ |d< | j	d ur°| j	|d< | j
d urÄ| j
|d	< |S )
NÚtyper.   r3   ÚattributeValuerC   ÚnativeSourceÚnativeSourceValuerF   ÚinvalidReason)Údictr>   r   r.   r3   rA   rC   rD   rE   rF   rG   ©r   r   r   r   r   r   {   s&    











zAXValueSource.to_jsonr   c                 C  s  | t  |d ¡| dd ¡d ur,t |d ¡nd | dd ¡d urJt|d ƒnd | dd ¡d urjt |d ¡nd | dd ¡d urˆt|d ƒnd | dd ¡d ur¨t |d ¡nd | dd ¡d urÈt |d ¡nd | dd ¡d uræt|d ƒnd | d	d ¡d u�rt|d	 ƒnd d
�	S )NrH   r.   r3   rI   rC   rJ   rK   rF   rL   )	r>   r.   r3   rA   rC   rD   rE   rF   rG   )r2   r   ÚgetÚAXValuer   Úboolr7   r   r   r   r   r   �   s6    ÿÿÿÿÿÿÿÿØzAXValueSource.from_json)r   r   r    r!   Ú__annotations__r.   r3   rA   rC   rD   rE   rF   rG   r   r"   r   r   r   r   r   r=   e   s   
r=   c                   @  sP   e Zd ZU ded< dZded< dZded< ddœd	d
„Zedd dœdd„ƒZdS )ÚAXRelatedNodezdom.BackendNodeIdÚbackend_dom_node_idNr@   r&   Útextr   r   c                 C  s@   t ƒ }| j ¡ |d< | jd ur(| j|d< | jd ur<| j|d< |S )NÚbackendDOMNodeIdr&   rU   )rM   rT   r   r&   rU   rN   r   r   r   r   È   s    



zAXRelatedNode.to_jsonr   c                 C  sR   | t j |d ¡| dd ¡d ur,t|d ƒnd | dd ¡d urJt|d ƒnd d�S )NrV   r&   rU   )rT   r&   rU   )r   ÚBackendNodeIdr   rO   r   r   r   r   r   r   Ñ   s    ÿÿÿôzAXRelatedNode.from_json)	r   r   r    rR   r&   rU   r   r"   r   r   r   r   r   rS   ¿   s   
	rS   c                   @  s@   e Zd ZU ded< ded< ddœdd„Zedd d	œd
d„ƒZdS )Ú
AXPropertyÚAXPropertyNameÚnamerP   r.   r   r   c                 C  s&   t ƒ }| j ¡ |d< | j ¡ |d< |S )NrZ   r.   )rM   rZ   r   r.   rN   r   r   r   r   ë   s    zAXProperty.to_jsonr   c                 C  s    | t  |d ¡t |d ¡d�S )NrZ   r.   )rZ   r.   )rY   r   rP   r   r   r   r   r   ñ   s    þzAXProperty.from_jsonN)r   r   r    rR   r   r"   r   r   r   r   r   rX   ä   s
   
rX   c                   @  s`   e Zd ZU dZded< dZded< dZded< dZd	ed
< ddœdd„Ze	dd dœdd„ƒZ
dS )rP   zA single computed AX property.r$   r>   Nztyping.Optional[typing.Any]r.   z+typing.Optional[typing.List[AXRelatedNode]]Úrelated_nodesz+typing.Optional[typing.List[AXValueSource]]Úsourcesr   r   c                 C  sh   t ƒ }| j ¡ |d< | jd ur(| j|d< | jd urFdd„ | jD ƒ|d< | jd urddd„ | jD ƒ|d< |S )NrH   r.   c                 S  s   g | ]}|  ¡ ‘qS r   ©r   ©Ú.0Úir   r   r   Ú
<listcomp>  ó    z#AXValue.to_json.<locals>.<listcomp>ÚrelatedNodesc                 S  s   g | ]}|  ¡ ‘qS r   r]   r^   r   r   r   ra     rb   r\   )rM   r>   r   r.   r[   r\   rN   r   r   r   r     s    



zAXValue.to_jsonr   c                 C  sv   | t  |d ¡| dd ¡d ur&|d nd | dd ¡d urJdd„ |d D ƒnd | dd ¡d urndd„ |d D ƒnd d�S )	NrH   r.   rc   c                 S  s   g | ]}t  |¡‘qS r   )rS   r   r^   r   r   r   ra     rb   z%AXValue.from_json.<locals>.<listcomp>r\   c                 S  s   g | ]}t  |¡‘qS r   )r=   r   r^   r   r   r   ra     rb   )r>   r.   r[   r\   )r$   r   rO   r   r   r   r   r     s    ÿÿózAXValue.from_json)r   r   r    r!   rR   r.   r[   r\   r   r"   r   r   r   r   r   rP   ù   s   
rP   c                   @  s  e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d8Z:d9Z;d:Z<d;d<œd=d>„Z=e>d;d d?œd@dA„ƒZ?dBS )CrY   a  
    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
    - from 'activeFullscreenElement' to 'uninteresting':
        reasons why this noode is hidden
    ÚbusyÚdisabledÚeditableZ	focusableZfocusedZhiddenZ
hiddenRootrF   ZkeyshortcutsZsettableZroledescriptionÚliveZatomicZrelevantÚrootÚautocompleteZhasPopupÚlevelZmultiselectableZorientationÚ	multilineÚreadonlyÚrequiredZvalueminZvaluemaxZ	valuetextÚcheckedÚexpandedZmodalZpressedÚselectedZactivedescendantZcontrolsZdescribedbyÚdetailsZerrormessageZflowtoZ
labelledbyZownsÚurlZactiveFullscreenElementZactiveModalDialogZactiveAriaModalDialogZariaHiddenElementZariaHiddenSubtreeZemptyAltZ	emptyTextZinertElementZinertSubtreeZlabelContainerZlabelForZnotRenderedZ
notVisibleZpresentationalRoleZprobablyPresentationalZinactiveCarouselTabContentZuninterestingr   r   c                 C  s   | j S r   r-   r   r   r   r   r   j  s    zAXPropertyName.to_jsonr   c                 C  s   | |ƒS r   r   r   r   r   r   r   m  s    zAXPropertyName.from_jsonN)@r   r   r    r!   ZBUSYZDISABLEDZEDITABLEZ	FOCUSABLEZFOCUSEDZHIDDENZHIDDEN_ROOTÚINVALIDZKEYSHORTCUTSZSETTABLEZROLEDESCRIPTIONZLIVEZATOMICZRELEVANTÚROOTZAUTOCOMPLETEZ	HAS_POPUPZLEVELZMULTISELECTABLEZORIENTATIONÚ	MULTILINEZREADONLYZREQUIREDZVALUEMINZVALUEMAXZ	VALUETEXTZCHECKEDZEXPANDEDZMODALZPRESSEDZSELECTEDZACTIVEDESCENDANTZCONTROLSZDESCRIBEDBYZDETAILSZERRORMESSAGEZFLOWTOZ
LABELLEDBYZOWNSÚURLZACTIVE_FULLSCREEN_ELEMENTZACTIVE_MODAL_DIALOGZACTIVE_ARIA_MODAL_DIALOGZARIA_HIDDEN_ELEMENTZARIA_HIDDEN_SUBTREEZ	EMPTY_ALTZ
EMPTY_TEXTZINERT_ELEMENTZINERT_SUBTREEZLABEL_CONTAINERZ	LABEL_FORZNOT_RENDEREDZNOT_VISIBLEZPRESENTATIONAL_ROLEZPROBABLY_PRESENTATIONALZINACTIVE_CAROUSEL_TAB_CONTENTZUNINTERESTINGr   r"   r   r   r   r   r   rY   $  sz   rY   c                   @  sÈ   e Zd ZU dZded< ded< dZded< dZd	ed
< dZd	ed< dZd	ed< dZ	d	ed< dZ
d	ed< dZded< dZded< dZded< dZded< dZded< ddœdd„Zedd dœdd„ƒZdS )ÚAXNodez!A node in the accessibility tree.r
   Únode_idrQ   ÚignoredNz(typing.Optional[typing.List[AXProperty]]Úignored_reasonsr?   r,   Úchrome_rolerZ   r8   r.   Ú
propertiesztyping.Optional[AXNodeId]Ú	parent_idz&typing.Optional[typing.List[AXNodeId]]Ú	child_idsú"typing.Optional[dom.BackendNodeId]rT   útyping.Optional[page.FrameId]Úframe_idr   r   c                 C  sB  t ƒ }| j ¡ |d< | j|d< | jd ur<dd„ | jD ƒ|d< | jd urT| j ¡ |d< | jd url| j ¡ |d< | jd ur„| j ¡ |d< | jd urœ| j ¡ |d	< | j	d ur´| j	 ¡ |d
< | j
d urÒdd„ | j
D ƒ|d< | jd urê| j ¡ |d< | jd u�r
dd„ | jD ƒ|d< | jd u�r$| j ¡ |d< | jd u�r>| j ¡ |d< |S )NÚnodeIdry   c                 S  s   g | ]}|  ¡ ‘qS r   r]   r^   r   r   r   ra   •  s   z"AXNode.to_json.<locals>.<listcomp>ÚignoredReasonsr,   Ú
chromeRolerZ   r8   r.   c                 S  s   g | ]}|  ¡ ‘qS r   r]   r^   r   r   r   ra   £  rb   r|   ÚparentIdc                 S  s   g | ]}|  ¡ ‘qS r   r]   r^   r   r   r   ra   §  rb   ÚchildIdsrV   ÚframeId)rM   rx   r   ry   rz   r,   r{   rZ   r8   r.   r|   r}   r~   rT   r�   rN   r   r   r   r   �  s8    

ÿ







zAXNode.to_jsonr   c                 C  s–  | t  |d ¡t|d ƒ| dd ¡d ur:dd„ |d D ƒnd | dd ¡d urZt |d ¡nd | dd ¡d urzt |d ¡nd | dd ¡d uršt |d ¡nd | d	d ¡d urºt |d	 ¡nd | d
d ¡d urÚt |d
 ¡nd | dd ¡d urþdd„ |d D ƒnd | dd ¡d u�r t  |d ¡nd | dd ¡d u�rFdd„ |d D ƒnd | dd ¡d u�rjtj |d ¡nd | dd ¡d u�rŽtj |d ¡nd d�S )Nr‚   ry   rƒ   c                 S  s   g | ]}t  |¡‘qS r   ©rX   r   r^   r   r   r   ra   ´  rb   z$AXNode.from_json.<locals>.<listcomp>r,   r„   rZ   r8   r.   r|   c                 S  s   g | ]}t  |¡‘qS r   rˆ   r^   r   r   r   ra   Ò  rb   r…   r†   c                 S  s   g | ]}t  |¡‘qS r   )r
   r   r^   r   r   r   ra   Ü  rb   rV   r‡   )rx   ry   rz   r,   r{   rZ   r8   r.   r|   r}   r~   rT   r�   )	r
   r   rQ   rO   rP   r   rW   r   ZFrameIdr   r   r   r   r   ®  sJ    
ÿÿÿÿÿÿÿÿÿÿÿÈzAXNode.from_json)r   r   r    r!   rR   rz   r,   r{   rZ   r8   r.   r|   r}   r~   rT   r�   r   r"   r   r   r   r   r   rw   r  s"   
rw   z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]r   c                  c  s   ddi} | V }dS )z"Disables the accessibility domain.ÚmethodzAccessibility.disableNr   ©Úcmd_dictr   r   r   r   Údisableí  s    ÿrŒ   c                  c  s   ddi} | V }dS )zå
    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.
    r‰   zAccessibility.enableNr   rŠ   r   r   r   Úenableõ  s    ÿr�   ztyping.Optional[dom.NodeId]r   z'typing.Optional[runtime.RemoteObjectId]rB   z?typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[AXNode]])rx   Úbackend_node_idÚ	object_idÚfetch_relativesr   c                 c  st   t ƒ }| dur|  ¡ |d< |dur.| ¡ |d< |durB| ¡ |d< |durR||d< d|dœ}|V }dd	„ |d
 D ƒS )að  
    Fetches the accessibility node and partial accessibility tree for
    this DOM node, if it exists.
    **EXPERIMENTAL**
    :param node_id: *(Optional)*
     Identifier of the node to get the partial accessibility tree for.
    :param backend_node_id: *(Optional)*
     Identifier of the backend node to get the partial accessibility tree for.
    :param object_id: *(Optional)*
     JavaScript object id of the node wrapper to get
     the partial accessibility tree for.
    :param fetch_relatives: *(Optional)*
     Whether to fetch this node's ancestors, siblings and children.
     Defaults to true.
    :returns: The ``Accessibility.AXNode`` for this DOM node,
     if it exists, plus its ancestors, siblings and children, if requested.
    Nr‚   ÚbackendNodeIdÚobjectIdZfetchRelativeszAccessibility.getPartialAXTree©r‰   Úparamsc                 S  s   g | ]}t  |¡‘qS r   ©rw   r   r^   r   r   r   ra   '  rb   z'get_partial_ax_tree.<locals>.<listcomp>Únodes©rM   r   )rx   rŽ   r�   r�   r”   r‹   r   r   r   r   Úget_partial_ax_tree  s    þr˜   ztyping.Optional[int]r€   )Údepthr�   r   c                 c  sL   t ƒ }| dur| |d< |dur*| ¡ |d< d|dœ}|V }dd„ |d D ƒS )	a�  
    Fetches the entire accessibility tree for the root Document.
    **EXPERIMENTAL**
    :param depth: *(Optional)* The maximum depth at which
     descendants of the root node should be retrieved.
     If omitted, the full tree is returned.
    :param frame_id: *(Optional)* The frame for whose document
     the AX tree should be retrieved. If omitted, the root frame is used.
    Nr™   r‡   zAccessibility.getFullAXTreer“   c                 S  s   g | ]}t  |¡‘qS r   r•   r^   r   r   r   ra   A  rb   z$get_full_ax_tree.<locals>.<listcomp>r–   r—   )r™   r�   r”   r‹   r   r   r   r   Úget_full_ax_tree*  s    þrš   z2typing.Generator[T_JSON_DICT, T_JSON_DICT, AXNode])r�   r   c                 c  s8   t ƒ }| dur|  ¡ |d< d|dœ}|V }t |d ¡S )zè
    Fetches the root node.
    Requires ``enable()`` to have been called previously.
    **EXPERIMENTAL**
    :param frame_id: *(Optional)* The frame in whose document
     the node resides. If omitted, the root frame is used.
    Nr‡   zAccessibility.getRootAXNoder“   r(   )rM   r   rw   r   )r�   r”   r‹   r   r   r   r   Úget_root_ax_nodeD  s    
þr›   )rx   rŽ   r�   r   c                 c  sd   t ƒ }| dur|  ¡ |d< |dur.| ¡ |d< |durB| ¡ |d< d|dœ}|V }dd„ |d	 D ƒS )
a…  
    Fetches a node and all ancestors up to and including the root.
    Requires ``enable()`` to have been called previously.
    **EXPERIMENTAL**
    :param node_id: *(Optional)* Identifier of the node to get.
    :param backend_node_id: *(Optional)*
     Identifier of the backend node to get.
    :param object_id: *(Optional)* JavaScript object id of
     the node wrapper to get.
    Nr‚   r‘   r’   z#Accessibility.getAXNodeAndAncestorsr“   c                 S  s   g | ]}t  |¡‘qS r   r•   r^   r   r   r   ra   t  rb   z-get_ax_node_and_ancestors.<locals>.<listcomp>r–   r—   )rx   rŽ   r�   r”   r‹   r   r   r   r   Úget_ax_node_and_ancestorsY  s    þrœ   )Úid_r�   r   c                 c  sH   t ƒ }|  ¡ |d< |dur&| ¡ |d< d|dœ}|V }dd„ |d D ƒS )	a  
    Fetches a particular accessibility node by AXNodeId.
    Requires ``enable()`` to have been called previously.
    **EXPERIMENTAL**
    :param id_:
    :param frame_id: *(Optional)* The frame in whose document the node resides.
     If omitted, the root frame is used.
    ÚidNr‡   zAccessibility.getChildAXNodesr“   c                 S  s   g | ]}t  |¡‘qS r   r•   r^   r   r   r   ra   ‹  rb   z&get_child_ax_nodes.<locals>.<listcomp>r–   r—   )r�   r�   r”   r‹   r   r   r   r   Úget_child_ax_nodesw  s    þrŸ   r@   )rx   rŽ   r�   Úaccessible_namer,   r   c                 c  s„   t ƒ }| dur|  ¡ |d< |dur.| ¡ |d< |durB| ¡ |d< |durR||d< |durb||d< d|dœ}|V }d	d
„ |d D ƒS )a6  
    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**
    :param node_id: *(Optional)* Identifier of the node for the root to query.
    :param backend_node_id: *(Optional)* Identifier of the backend node for
     the root to query.
    :param object_id: *(Optional)* JavaScript object id of the node wrapper
     for the root to query.
    :param accessible_name: *(Optional)* Find nodes with this computed name.
    :param role: *(Optional)* Find nodes with this computed role.
    :returns: A list of ``Accessibility.AXNode`` matching the specified
     attributes, including nodes that are ignored for accessibility.
    Nr‚   r‘   r’   ZaccessibleNamer,   zAccessibility.queryAXTreer“   c                 S  s   g | ]}t  |¡‘qS r   r•   r^   r   r   r   ra   ¹  rb   z!query_ax_tree.<locals>.<listcomp>r–   r—   )rx   rŽ   r�   r    r,   r”   r‹   r   r   r   r   Úquery_ax_treeŽ  s     þr¡   zAccessibility.loadCompletec                   @  s.   e Zd ZU dZded< edd dœdd„ƒZdS )	ÚLoadCompletez­
    **EXPERIMENTAL**
    The loadComplete event mirrors the load complete event sent by
    the browser to assistive technology when the web page has finished loading.
    rw   rh   r   r   c                 C  s   | t  |d ¡d�S )Nrh   )rh   r•   r   r   r   r   r   Ç  s    zLoadComplete.from_jsonN©r   r   r    r!   rR   r"   r   r   r   r   r   r¢   ¼  s   
r¢   zAccessibility.nodesUpdatedc                   @  s.   e Zd ZU dZded< edd dœdd„ƒZdS )	ÚNodesUpdatedz�
    **EXPERIMENTAL**
    The nodesUpdated event is sent every time a
    previously requested node has changed in the tree.
    ztyping.List[AXNode]r–   r   r   c                 C  s   | dd„ |d D ƒd�S )Nc                 S  s   g | ]}t  |¡‘qS r   r•   r^   r   r   r   ra   Ù  rb   z*NodesUpdated.from_json.<locals>.<listcomp>r–   )r–   r   r   r   r   r   r   ×  s    zNodesUpdated.from_jsonNr£   r   r   r   r   r¤   Ì  s   
r¤   )NNNN)NN)N)NNN)N)NNNNN)#Ú
__future__r   ÚenumÚtypingÚdataclassesr   Úutilr   r   Ú r   r   r	   r   r
   ÚEnumr$   r2   r7   r=   rS   rX   rP   rY   rw   rŒ   r�   r˜   rš   r›   rœ   rŸ   r¡   r¢   r¤   r   r   r   r   Ú<module>   sh   Y$*Nz    ü)  þ ÿ   ý ÿ     û.