
    vKg                     N    S SK r S SKJr  S SKJr   " S S5      r " S S\5      rg)    N)DesiredCapabilities)
ArgOptionsc                   *    \ rS rSrSrS rS rS rSrg)_SafariOptionsDescriptor   a  _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                     Xl         X l        g N)nameexpected_type)selfr
   r   s      a/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/selenium/webdriver/safari/options.py__init__!_SafariOptionsDescriptor.__init__-   s    	*    c                     U R                   S:X  a(  UR                  R                  S5      U R                   :H  $ UR                  R                  U R                   5      $ )NSafari Technology PreviewbrowserName)r
   _capsget)r   objclss      r   __get__ _SafariOptionsDescriptor.__get__1   sB    993399==/499<<yy}}TYY''r   c                    [        X R                  5      (       d$  [        U R                   SU R                   35      eU R                  S:X  a#  U(       a  U R                  OSUR                  S'   g X!R                  U R                  '   g )Nz must be of type r   safarir   )
isinstancer   	TypeErrorr
   r   )r   r   values      r   __set__ _SafariOptionsDescriptor.__set__6   sh    %!3!344tyyk):4;M;M:NOPP993349tyyxCIIm$#(IIdii r   )r   r
   N)	__name__
__module____qualname____firstlineno____doc__r   r   r   __static_attributes__ r   r   r   r      s    *+(
)r   r   c                       \ rS rSrSrSrSr\" \\5      r	 \" \\5      r
 \" \\5      r \S\R                  \\4   4S j5       rSrg)	Options?   zsafari:automaticInspectionzsafari:automaticProfilingr   returnc                 >    [         R                  R                  5       $ r	   )r   SAFARIcopy)r   s    r   default_capabilitiesOptions.default_capabilitiesq   s    "))..00r   r'   N)r!   r"   r#   r$   AUTOMATIC_INSPECTIONAUTOMATIC_PROFILINGSAFARI_TECH_PREVIEWr   boolautomatic_inspectionautomatic_profilinguse_technology_previewpropertytypingDictstrr/   r&   r'   r   r   r)   r)   ?   s{    755 44H$O 33FM 66I4P 1fkk#s(&; 1 1r   r)   )r9   .selenium.webdriver.common.desired_capabilitiesr   !selenium.webdriver.common.optionsr   r   r)   r'   r   r   <module>r>      s'   "  N 8%) %)P41j 41r   