
    ,h                     R    d dl mZ d dlmZ d dlmZ  G d d      Z G d de      Zy)	    )Dict)DesiredCapabilities)
ArgOptionsc                   "    e Zd ZdZd Zd Zd Zy)_SafariOptionsDescriptora!  _SafariOptionsDescriptor is an implementation of Descriptor protocol:

    : Any look-up or assignment to the below attributes in `Options` class will be intercepted
    by `__get__` and `__set__` method respectively.

    - `automatic_inspection`
    - `automatic_profiling`
    - `use_technology_preview`

    : When an attribute lookup happens,
    Example:
        `self.automatic_inspection`
        `__get__` method does a dictionary look up in the dictionary `_caps` of `Options` class
        and returns the value of key `safari:automaticInspection`
    : When an attribute assignment happens,
    Example:
        `self.automatic_inspection` = True
        `__set__` method sets/updates the value of the key `safari:automaticInspection` in `_caps`
        dictionary in `Options` class.
    c                      || _         || _        y N)nameexpected_type)selfr
   r   s      c/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/selenium/webdriver/safari/options.py__init__z!_SafariOptionsDescriptor.__init__-   s    	*    c                     | j                   dk(  r(|j                  j                  d      | j                   k(  S |j                  j                  | j                         S )NSafari Technology PreviewbrowserName)r
   _capsget)r   objclss      r   __get__z _SafariOptionsDescriptor.__get__1   sB    993399==/499<<yy}}TYY''r   c                    t        || j                        s$t        | j                   d| j                         | j                  dk(  r|r| j                  nd|j                  d<   y ||j                  | j                  <   y )Nz must be of type r   safarir   )
isinstancer   	TypeErrorr
   r   )r   r   values      r   __set__z _SafariOptionsDescriptor.__set__6   si    %!3!34tyyk):4;M;M:NOPP993349tyyxCIIm$#(CIIdii r   N)__name__
__module____qualname____doc__r   r   r    r   r   r   r      s    *+(
)r   r   c                   t    e Zd ZdZdZdZ eee      Z	  eee      Z		  eee      Z
	 edeeef   fd       Zy)Optionszsafari:automaticInspectionzsafari:automaticProfilingr   returnc                 >    t         j                  j                         S r	   )r   SAFARIcopy)r   s    r   default_capabilitieszOptions.default_capabilitiesq   s    "))..00r   N)r   r   r    AUTOMATIC_INSPECTIONAUTOMATIC_PROFILINGSAFARI_TECH_PREVIEWr   boolautomatic_inspectionautomatic_profilinguse_technology_previewpropertyr   strr)   r"   r   r   r$   r$   ?   sv    755 44H$O 33FM 66I4P 1d38n 1 1r   r$   N)typingr   .selenium.webdriver.common.desired_capabilitiesr   !selenium.webdriver.common.optionsr   r   r$   r"   r   r   <module>r6      s'   "  N 8%) %)P41j 41r   