o
    ҷh
                     @   s2   d dl Z d dlZd dlmZ G dd dejZdS )    N)servicec                       s   e Zd ZdZ						ddedededejej	e  d	ejej
eef  d
df fddZd
ej	e fddZed
efddZed
efddZejded
dfddZ  ZS )Servicea  A Service class that is responsible for the starting and stopping of
    `safaridriver`  This is only supported on MAC OSX.

    :param executable_path: install path of the safaridriver executable, defaults to `/usr/bin/safaridriver`.
    :param port: Port for the service to run on, defaults to 0 where the operating system will decide.
    :param quiet: (Deprecated) Suppress driver stdout & stderr, redirects to os.devnull if enabled.
    :param service_args: (Optional) List of args to be passed to the subprocess when launching the executable.
    :param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
    Nr   Fexecutable_pathportquietservice_argsenvreturnc                    sF   |pg | _ |d urtjdtdd || _t jd|||d| d S )Nz+quiet is no longer needed to supress output   )
stacklevel)
executabler   r    )r   warningswarnDeprecationWarning_reuse_servicesuper__init__)selfr   r   r   r   r   reuse_servicekwargs	__class__r   T/var/www/html/venv/lib/python3.10/site-packages/selenium/webdriver/safari/service.pyr   #   s   


zService.__init__c                 C   s   d| j  g| j S )Nz-p)r   r   r   r   r   r   command_line_args9   s   zService.command_line_argsc                 C   s   d| j  S )z)Gets the url of the SafariDriver Service.zhttp://localhost:)r   r   r   r   r   service_url<   s   zService.service_urlc                 C   s   | j S )N)r   r   r   r   r   r   A   s   zService.reuse_servicereusec                 C   s   t |ts	td|| _d S )Nzreuse must be a boolean)
isinstancebool	TypeErrorr   )r   r   r   r   r   r   E   s   

)Nr   NNNF)__name__
__module____qualname____doc__strintr   typingOptionalListMappingr   r   propertyr   r   setter__classcell__r   r   r   r   r      s8    	r   )r'   r   selenium.webdriver.commonr   r   r   r   r   r   <module>   s   