
    X j                     L    S SK Jr   " S S5      r " S S5      r " S S5      rg)	    command_builderc                   .    \ rS rSrSrSrSrSr\\\1rSr	g)UserPromptHandlerType   z3Represents the behavior of the user prompt handler.acceptdismissignore N)
__name__
__module____qualname____firstlineno____doc__ACCEPTDISMISSIGNOREVALID_TYPES__static_attributes__r       w/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/selenium/webdriver/common/bidi/session.pyr   r      s     =FGF7F+Kr   r   c                       \ rS rSrSr      SS\S-  S\S-  S\S-  S\S-  S\S-  S	\S-  4S
 jjrS\\\4   4S jrSr	g)UserPromptHandler    z8Represents the configuration of the user prompt handler.Nalertbefore_unloadconfirmdefaultfilepromptc           	          SU4SU4SU4SU4SU4SU44 H@  u  pxUc  M
  U[         R                  ;  d  M   [        SU S	U S
[         R                   35      e   Xl        X l        X0l        X@l        XPl        X`l        g)a  Initialize UserPromptHandler.

Args:
    alert: Handler type for alert prompts.
    before_unload: Handler type for beforeUnload prompts.
    confirm: Handler type for confirm prompts.
    default: Default handler type for all prompts.
    file: Handler type for file picker prompts.
    prompt: Handler type for prompt dialogs.

Raises:
    ValueError: If any handler type is not valid.
r   r   r   r   r   r    NzInvalid z handler type: z. Must be one of )	r   r   
ValueErrorr   r   r   r   r   r    )	selfr   r   r   r   r   r    
field_namevalues	            r   __init__UserPromptHandler.__init__#   s    . em,  TNv"
J  U2G2S2S%S zl/%@QRgRsRsQtu "
 
*	r   returnc                 v    SSSSSSS.n0 nUR                  5        H  u  p4[        X5      nUc  M  XRU'   M     U$ )zConvert the UserPromptHandler to a dictionary for BiDi protocol.

Returns:
    Dictionary representation suitable for BiDi protocol.
r   beforeUnloadr   r   r   r    r   r   r   r   r   r    )itemsgetattr)r#   field_mappingresult	attr_namedict_keyr%   s         r   to_dictUserPromptHandler.to_dictM   sY     +  
 #0#6#6#8ID,E #(x  $9 r   r+   )NNNNNN)
r   r   r   r   r   strr&   dictr2   r   r   r   r   r   r       s    B !$(""!(Tz( Tz( t	(
 t( Dj( d
(Tc3h r   r   c                   <    \ rS rSrS rSS.S jrSS.S jrS rSrg)	Sessiond   c                     Xl         g )Nconn)r#   r;   s     r   r&   Session.__init__e   s    	r   N)browsing_contextsc                B    SU0nUc  / nU(       a  XS'   [        SU5      $ )NeventsbrowsingContextszsession.subscriber   r#   r=   r?   paramss       r   	subscribeSession.subscribeh   s6    f
 $ "):%&2F;;r   c                B    SU0nUc  / nU(       a  XS'   [        SU5      $ )Nr?   r@   zsession.unsubscriber   rA   s       r   unsubscribeSession.unsubscriber   s6    f
 $ "):%&4f==r   c                 P    [        S0 5      nU R                  R                  U5      $ )a(  The session.status command returns information about the remote end's readiness.

Returns information about the remote end's readiness to create new sessions
and may include implementation-specific metadata.

Returns:
    Dictionary containing the ready state (bool), message (str) and metadata.
zsession.status)r   r;   execute)r#   cmds     r   statusSession.status|   s&     .3yy  %%r   r:   )	r   r   r   r   r&   rC   rF   rK   r   r   r   r   r7   r7   d   s      48 < 6: >
&r   r7   N)%selenium.webdriver.common.bidi.commonr   r   r   r7   r   r   r   <module>rN      s,   & B, ,A AH"& "&r   