o
    Ò·hH  ã                   @   s,   d dl mZ d dlmZ G dd„ deƒZdS )é    )ÚDesiredCapabilities)Ú
ArgOptionsc                       sT   e Zd ZdZd‡ fdd„Zedefdd„ƒZejdeddfd	d„ƒZd
d„ Z	‡  Z
S )ÚOptionszwpe:browserOptionsÚreturnNc                    s    t ƒ  ¡  d| _tj ¡ | _d S )NÚ )ÚsuperÚ__init__Ú_binary_locationr   Ú	WPEWEBKITÚcopyÚ_caps©Úself©Ú	__class__© úW/var/www/html/venv/lib/python3.10/site-packages/selenium/webdriver/wpewebkit/options.pyr      s   
zOptions.__init__c                 C   s   | j S )zMReturns the location of the browser binary otherwise an empty
        string.)r	   r   r   r   r   Úbinary_location   s   zOptions.binary_locationÚvaluec                 C   s   t |tƒs
t| jƒ‚|| _dS )zvAllows you to set the browser binary to launch.

        :Args:
         - value : path to the browser binary
        N)Ú
isinstanceÚstrÚ	TypeErrorÚBINARY_LOCATION_ERRORr	   )r   r   r   r   r   r   $   s   


c                 C   s8   | j }i }| jr| j|d< | jr| j|d< ||tj< |S )zpCreates a capabilities with all the options that have been set and
        returns a dictionary with everything.ÚbinaryÚargs)r   r   Ú	argumentsr   ÚKEY)r   ÚcapsÚbrowser_optionsr   r   r   Úto_capabilities/   s   


zOptions.to_capabilities)r   N)Ú__name__Ú
__module__Ú__qualname__r   r   Úpropertyr   r   Úsetterr   Ú__classcell__r   r   r   r   r      s    
r   N)Ú.selenium.webdriver.common.desired_capabilitiesr   Ú!selenium.webdriver.common.optionsr   r   r   r   r   r   Ú<module>   s   