ó
    ¾®iZ  ã                   ól   • S SK JrJr  S SKJrJrJr  S SKJr  S SK	J
r
  S SKJr  S SKJr   " S S5      rg	)
é    )ÚOptionalÚUnion)ÚNoSuchElementExceptionÚNoSuchFrameExceptionÚNoSuchWindowException)ÚAlert)ÚBy)ÚCommand)Ú
WebElementc                   óÀ   • \ rS rSrSS jr\S\4S j5       r\S\4S j5       r	SS jr
S\\\\4   SS4S	 jrSS
\\   SS4S jjrSS jrS\SS4S jrS\SS4S jrSrg)ÚSwitchToé   ÚreturnNc                 ó8   • SS K nUR                  U5      U l        g )Nr   )ÚweakrefÚproxyÚ_driver)ÚselfÚdriverr   s      ÚPC:\des-py\RoboSAPF\venv\Lib\site-packages\selenium\webdriver\remote\switch_to.pyÚ__init__ÚSwitchTo.__init__   s   € Ûà—}‘} VÓ,ˆ�ó    c                 óZ   • U R                   R                  [        R                  5      S   $ )zvReturns the element with focus, or BODY if nothing has focus.

Example:
    element = driver.switch_to.active_element
Úvalue)r   Úexecuter
   ÚW3C_GET_ACTIVE_ELEMENT©r   s    r   Úactive_elementÚSwitchTo.active_element!   s$   € ð �|‰|×#Ñ#¤G×$BÑ$BÓCÀGÑLÐLr   c                 óH   • [        U R                  5      nUR                  nU$ )zUSwitches focus to an alert on the page.

Example:
    alert = driver.switch_to.alert
)r   r   Útext)r   ÚalertÚ_s      r   r#   ÚSwitchTo.alert*   s    € ô �d—l‘lÓ#ˆØ�J‰JˆØˆr   c                 ó\   • U R                   R                  [        R                  SS05        g)zTSwitch focus to the default frame.

Example:
    driver.switch_to.default_content()
ÚidN)r   r   r
   ÚSWITCH_TO_FRAMEr   s    r   Údefault_contentÚSwitchTo.default_content5   s"   € ð 	�‰×ÑœW×4Ñ4°t¸T°lÕCr   Úframe_referencec                 óŽ  • [        U[        5      (       a+   U R                  R                  [        R
                  U5      nU R                  R                  [        R                  SU05        g! [         aL     U R                  R                  [        R                  U5      n Nd! [         a  n[        U5      UeSnAff = ff = f)aŒ  Switches focus to the specified frame, by index, name, or
webelement.

Args:
    frame_reference: The name of the window to switch to, an integer representing the index,
        or a webelement that is an (i)frame to switch to.

Example:
        driver.switch_to.frame("frame_name")
        driver.switch_to.frame(1)
        driver.switch_to.frame(driver.find_elements(By.TAG_NAME, "iframe")[0])
Nr'   )Ú
isinstanceÚstrr   Úfind_elementr	   ÚIDr   ÚNAMEr   r   r
   r(   )r   r+   Úexcs      r   ÚframeÚSwitchTo.frame=   s¤   € ô �o¤s×+Ñ+ðIØ"&§,¡,×";Ñ";¼B¿E¹EÀ?Ó"S�ð 	�‰×ÑœW×4Ñ4°t¸_Ð6MÕNøô *ó IðIØ&*§l¡l×&?Ñ&?ÄÇÁÈÓ&Y’OøÜ-ó IÜ.¨Ó?ÀSÐHûðIúðIús)   —*A. Á.
CÁ9*B%Â%
C Â/B;Â;C Ã CÚ	type_hintc                 óŠ   • U R                   R                  [        R                  SU05      S   nU R	                  US   5        g)zÎSwitches to a new top-level browsing context.

The type hint can be one of "tab" or "window". If not specified the
browser will automatically select it.

Example:
        driver.switch_to.new_window("tab")
Útyper   ÚhandleN)r   r   r
   Ú
NEW_WINDOWÚ_w3c_window)r   r5   r   s      r   Ú
new_windowÚSwitchTo.new_windowU   s<   € ð —‘×$Ñ$¤W×%7Ñ%7¸&À)Ð9LÓMÈgÑVˆØ×Ñ˜˜x™Õ)r   c                 óV   • U R                   R                  [        R                  5        g)z±Switches focus to the parent context. If the current context is the
top level browsing context, the context remains unchanged.

Example:
        driver.switch_to.parent_frame()
N)r   r   r
   ÚSWITCH_TO_PARENT_FRAMEr   s    r   Úparent_frameÚSwitchTo.parent_framea   s   € ð 	�‰×ÑœW×;Ñ;Õ<r   Úwindow_namec                 ó&   • U R                  U5        g)z¤Switches focus to the specified window.

Args:
    window_name: The name or window handle of the window to switch to.

Example:
    driver.switch_to.window("main")
N)r:   )r   rA   s     r   ÚwindowÚSwitchTo.windowj   s   € ð 	×Ñ˜Õ%r   c                 ó  ^ • U 4S jn U" U5        g ! [          aj    T R                  R                  nT R                  R                  nU H.  nU" U5        T R                  R	                  S5      nX:X  d  M-     g    U" U5        e f = f)Nc                 ó^   >• TR                   R                  [        R                  SU 05        g )Nr8   )r   r   r
   ÚSWITCH_TO_WINDOW)Úhr   s    €r   Úsend_handleÚ)SwitchTo._w3c_window.<locals>.send_handlev   s!   ø€ Ø�L‰L× Ñ ¤×!9Ñ!9¸HÀa¸=ÕIr   zreturn window.name)r   r   Úcurrent_window_handleÚwindow_handlesÚexecute_script)r   rA   rI   Úoriginal_handleÚhandlesr8   Úcurrent_names   `      r   r:   ÚSwitchTo._w3c_windowu   s€   ø€ õ	Jð	á˜Õ$øÜ$ó 
	à"Ÿl™l×@Ñ@ˆOØ—l‘l×1Ñ1ˆGÛ!�Ù˜FÔ#Ø#Ÿ|™|×:Ñ:Ð;OÓP�ØÕ.Úñ	 "ñ
 ˜Ô(Øð
	ús   ‰ ’A!BÁ7BÁ:B)r   )r   N)N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   Úpropertyr   r   r   r#   r)   r   r.   Úintr3   r   r;   r?   rC   r:   Ú__static_attributes__© r   r   r   r      sª   † ô-ð
 ðM 
ó Mó ðMð ð�uó ó ðôDðO U¨3°°ZÐ+?Ñ%@ð OÀTô Oñ0
* H¨S¡Mð 
*¸Tõ 
*ô=ð	& #ð 	&¨$ô 	&ð sð ¨t÷ r   r   N)Útypingr   r   Úselenium.common.exceptionsr   r   r   Úselenium.webdriver.common.alertr   Úselenium.webdriver.common.byr	   Ú!selenium.webdriver.remote.commandr
   Ú$selenium.webdriver.remote.webelementr   r   rY   r   r   Ú<module>r`      s(   ð÷$ #ç jÑ jÝ 1Ý +Ý 5Ý ;÷kò kr   