
    ,hJ(                        d Z ddlmZ ddlmZ dZdZ G d de      Z G d d	e      Z G d
 de      Z	 G d de      Z
 G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d  d!e      Z G d" d#e      Z G d$ d%e      Z G d& d'e      Z G d( d)e      Z G d* d+e      Z G d, d-e      Z G d. d/e      Z G d0 d1e      Z G d2 d3e      Z G d4 d5e      Z G d6 d7e      Z G d8 d9e      Z  G d: d;e      Z! G d< d=e      Z" G d> d?e      Z# G d@ dAe      Z$ G dB dCe      Z% G dD dEe      Z& G dF dGe      Z' G dH dIe      Z(yJ)Kz5Exceptions that may happen in all the webdriver code.    )Optional)Sequencez.For documentation on this error, please visit:zGhttps://www.selenium.dev/documentation/webdriver/troubleshooting/errorsc            	       \     e Zd ZdZ	 d	dee   dee   deee      ddf fdZdefdZ xZ	S )
WebDriverExceptionzBase webdriver exception.Nmsgscreen
stacktracereturnc                 L    t         |           || _        || _        || _        y N)super__init__r   r   r	   )selfr   r   r	   	__class__s       \/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/selenium/common/exceptions.pyr   zWebDriverException.__init__   s%     	$    c                     d| j                    d}| j                  r|dz  }| j                  r#dj                  | j                        }|d| z  }|S )Nz	Message: 
z!Screenshot: available via screen
zStacktrace:
)r   r   r	   join)r   exception_msgr	   s      r   __str__zWebDriverException.__str__%   sV    #DHH:R0;;AAM??4??3J}ZL99Mr   NNN
__name__
__module____qualname____doc__r   strr   r   r   __classcell__r   s   @r   r   r      sR    # nr%C=%19#%S[\deh\iSj%	% r   r   c                       e Zd ZdZy)InvalidSwitchToTargetExceptionz@Thrown when frame or window target to be switched doesn't exist.Nr   r   r   r    r   r   r"   r"   /       Jr   r"   c                       e Zd ZdZy)NoSuchFrameExceptionz6Thrown when frame target to be switched doesn't exist.Nr#   r$   r   r   r'   r'   3   s    @r   r'   c                       e Zd ZdZy)NoSuchWindowExceptionzThrown when window target to be switched doesn't exist.

    To find the current set of active window handles, you can get a list
    of the active window handles in the following way::

        print driver.window_handles
    Nr#   r$   r   r   r)   r)   7       r   r)   c            	       P     e Zd ZdZ	 ddee   dee   deee      ddf fdZ xZS )	NoSuchElementExceptiona  Thrown when element could not be found.

    If you encounter this exception, you may want to check the following:
        * Check your selector used in your find_by...
        * Element may not yet be on the screen at the time of the find operation,
          (webpage is still loading) see selenium.webdriver.support.wait.WebDriverWait()
          for how to write a wait wrapper to wait for an element to appear.
    Nr   r   r	   r
   c                 N    | dt          dt         d}t        |   |||       y )N;  z#no-such-element-exceptionSUPPORT_MSG	ERROR_URLr   r   r   r   r   r	   with_supportr   s        r   r   zNoSuchElementException.__init__K   s/     bQyk9STvz:r   r   	r   r   r   r   r   r   r   r   r   r    s   @r   r,   r,   A   M     nr;C=;19#;S[\deh\iSj;	; ;r   r,   c                       e Zd ZdZy)NoSuchAttributeExceptiona$  Thrown when the attribute of element could not be found.

    You may want to check if the attribute exists in the particular
    browser you are testing against.  Some browsers may have different
    property names for the same property.  (IE8's .innerText vs. Firefox
    .textContent)
    Nr#   r$   r   r   r8   r8   S   r*   r   r8   c                       e Zd ZdZy)NoSuchShadowRootExceptionzlThrown when trying to access the shadow root of an element when it does
    not have a shadow root attached.Nr#   r$   r   r   r:   r:   ]   s    (r   r:   c            	       P     e Zd ZdZ	 ddee   dee   deee      ddf fdZ xZS )	StaleElementReferenceExceptiona  Thrown when a reference to an element is now "stale".

    Stale means the element no longer appears on the DOM of the page.


    Possible causes of StaleElementReferenceException include, but not limited to:
        * You are no longer on the same page, or the page may have refreshed since the element
          was located.
        * The element may have been removed and re-added to the screen, since it was located.
          Such as an element being relocated.
          This can happen typically with a javascript framework when values are updated and the
          node is rebuilt.
        * Element may have been inside an iframe or another context which was refreshed.
    Nr   r   r	   r
   c                 N    | dt          dt         d}t        |   |||       y )Nr.   r/   z"#stale-element-reference-exceptionr0   r3   s        r   r   z'StaleElementReferenceException.__init__r   s/     bQyk9[\vz:r   r   r5   r    s   @r   r<   r<   b   sM      nr;C=;19#;S[\deh\iSj;	; ;r   r<   c                       e Zd ZdZy)InvalidElementStateExceptionzThrown when a command could not be completed because the element is in
    an invalid state.

    This can be caused by attempting to clear an element that isn't both
    editable and resettable.
    Nr#   r$   r   r   r?   r?   z       r   r?   c                   p     e Zd ZdZ	 	 	 	 d
dee   dee   deee      dee   ddf
 fdZdef fd	Z xZ	S )UnexpectedAlertPresentExceptionzThrown when an unexpected alert has appeared.

    Usually raised when  an unexpected modal is blocking the webdriver
    from executing commands.
    Nr   r   r	   
alert_textr
   c                 6    t         |   |||       || _        y r   )r   r   rC   )r   r   r   r	   rC   r   s        r   r   z(UnexpectedAlertPresentException.__init__   s     	fj1$r   c                 @    d| j                    dt        | 	          S )NzAlert Text: r   )rC   r   r   )r   r   s    r   r   z'UnexpectedAlertPresentException.__str__   s#    doo.b1B0CDDr   )NNNNr   r    s   @r   rB   rB      st     " $.2$(%c]% % Xc]+	%
 SM% 
%E E Er   rB   c                       e Zd ZdZy)NoAlertPresentExceptionzThrown when switching to no presented alert.

    This can be caused by calling an operation on the Alert() class when
    an alert is not yet on the screen.
    Nr#   r$   r   r   rG   rG          r   rG   c                       e Zd ZdZy)ElementNotVisibleExceptionzThrown when an element is present on the DOM, but it is not visible, and
    so is not able to be interacted with.

    Most commonly encountered when trying to click or read text of an
    element that is hidden from view.
    Nr#   r$   r   r   rJ   rJ      r@   r   rJ   c                       e Zd ZdZy)ElementNotInteractableExceptionzThrown when an element is present in the DOM but interactions with that
    element will hit another element due to paint order.Nr#   r$   r   r   rL   rL      s    <r   rL   c                       e Zd ZdZy)ElementNotSelectableExceptionzjThrown when trying to select an unselectable element.

    For example, selecting a 'script' element.
    Nr#   r$   r   r   rN   rN      s    r   rN   c                       e Zd ZdZy)InvalidCookieDomainExceptionzYThrown when attempting to add a cookie under a different domain than the
    current URL.Nr#   r$   r   r   rP   rP      s    r   rP   c                       e Zd ZdZy)UnableToSetCookieExceptionz+Thrown when a driver fails to set a cookie.Nr#   r$   r   r   rR   rR      s    5r   rR   c                       e Zd ZdZy)TimeoutExceptionz7Thrown when a command does not complete in enough time.Nr#   r$   r   r   rT   rT      s    Ar   rT   c                       e Zd ZdZy)MoveTargetOutOfBoundsExceptionzjThrown when the target provided to the `ActionsChains` move() method is
    invalid, i.e. out of document.Nr#   r$   r   r   rV   rV      s    &r   rV   c                       e Zd ZdZy)UnexpectedTagNameExceptionz@Thrown when a support class did not get an expected web element.Nr#   r$   r   r   rX   rX      r%   r   rX   c            	       P     e Zd ZdZ	 ddee   dee   deee      ddf fdZ xZS )	InvalidSelectorExceptionaH  Thrown when the selector which is used to find an element does not
    return a WebElement.

    Currently this only happens when the selector is an xpath expression
    and it is either syntactically invalid (i.e. it is not a xpath
    expression) or the expression does not select WebElements (e.g.
    "count(//input)").
    Nr   r   r	   r
   c                 N    | dt          dt         d}t        |   |||       y )Nr.   r/   z#invalid-selector-exceptionr0   r3   s        r   r   z!InvalidSelectorException.__init__   s/     bQyk9TUvz:r   r   r5   r    s   @r   rZ   rZ      r6   r   rZ   c                       e Zd ZdZy)ImeNotAvailableExceptionzThrown when IME support is not available.

    This exception is thrown for every IME-related method call if IME
    support is not available on the machine.
    Nr#   r$   r   r   r]   r]      rH   r   r]   c                       e Zd ZdZy)ImeActivationFailedExceptionz0Thrown when activating an IME engine has failed.Nr#   r$   r   r   r_   r_      s    :r   r_   c                       e Zd ZdZy)InvalidArgumentExceptionzBThe arguments passed to a command are either invalid or malformed.Nr#   r$   r   r   ra   ra          Lr   ra   c                       e Zd ZdZy)JavascriptExceptionzBAn error occurred while executing JavaScript supplied by the user.Nr#   r$   r   r   rd   rd      rb   r   rd   c                       e Zd ZdZy)NoSuchCookieExceptionzNo cookie matching the given path name was found amongst the associated
    cookies of the current browsing context's active document.Nr#   r$   r   r   rf   rf      s    Br   rf   c                       e Zd ZdZy)ScreenshotExceptionz%A screen capture was made impossible.Nr#   r$   r   r   rh   rh      s    /r   rh   c                       e Zd ZdZy) ElementClickInterceptedExceptionzThe Element Click command could not be completed because the element
    receiving the events is obscuring the element that was requested to be
    clicked.Nr#   r$   r   r   rj   rj      s    r   rj   c                       e Zd ZdZy)InsecureCertificateExceptionzNavigation caused the user agent to hit a certificate warning, which is
    usually the result of an expired or invalid TLS certificate.Nr#   r$   r   r   rl   rl      s    Dr   rl   c                       e Zd ZdZy)InvalidCoordinatesExceptionzCThe coordinates provided to an interaction's operation are invalid.Nr#   r$   r   r   rn   rn     s    Mr   rn   c                       e Zd ZdZy)InvalidSessionIdExceptionzOccurs if the given session id is not in the list of active sessions,
    meaning the session either does not exist or that it's not active.Nr#   r$   r   r   rp   rp   	  s    Jr   rp   c                       e Zd ZdZy)SessionNotCreatedExceptionz#A new session could not be created.Nr#   r$   r   r   rr   rr     s    -r   rr   c                       e Zd ZdZy)UnknownMethodExceptionzYThe requested command matched a known URL but did not match any methods
    for that URL.Nr#   r$   r   r   rt   rt     s    r   rt   c            	       P     e Zd ZdZ	 ddee   dee   deee      ddf fdZ xZS )	NoSuchDriverExceptionz:Raised when driver is not specified and cannot be located.Nr   r   r	   r
   c                 N    | dt          dt         d}t        |   |||       y )Nr.   r/   z/driver_locationr0   r3   s        r   r   zNoSuchDriverException.__init__  s/     bQyk9IJvz:r   r   r5   r    s   @r   rv   rv     sK    D nr;C=;19#;S[\deh\iSj;	; ;r   rv   c                       e Zd ZdZy)DetachedShadowRootExceptionzDRaised when referenced shadow root is no longer attached to the DOM.Nr#   r$   r   r   ry   ry   "  s    Nr   ry   N))r   typingr   r   r1   r2   	Exceptionr   r"   r'   r)   r,   r8   r:   r<   r?   rB   rG   rJ   rL   rN   rP   rR   rT   rV   rX   rZ   r]   r_   ra   rd   rf   rh   rj   rl   rn   rp   rr   rt   rv   ry   r$   r   r   <module>r|      s  " <  >U	 *K%7 KA9 A: ;/ ;$1 ( 2 (
;%7 ;0#5 E&8 E*0 != <&B <
$@ #5 
6!3 6B) B&%7 &
K!3 K;1 ;$1 ;#5 ;M1 MM, MB. B
0, 0'9 D#5 D
N"4 NJ 2 J
.!3 ./ 
;. ;O"4 Or   