
    Y j                     F    S SK Jr  S SKJr   " S S5      r " S S\5      rg)    )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 when an attribute lookup happens:

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

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`)

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      r/root/GenerationalWealth/GenerationalWealth/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__/   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__4   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\\\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_capabilitiesM   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dictstrr/   r&   r'   r   r   r)   r)   =   sj    755 44H$O123FM056I4P31d38n 1 1r   r)   N).selenium.webdriver.common.desired_capabilitiesr   !selenium.webdriver.common.optionsr   r   r)   r'   r   r   <module>r=      s%   $ O 8$) $)N1j 1r   