U
    ¾¸b¢  ã                   @   s,   d dl mZ d dlmZ G dd„ deƒZdS )é    )ÚDesiredCapabilities)Ú
ArgOptionsc                       sV   e Zd ZdZ‡ fdd„Zedd„ ƒZdd„ Zedd	„ ƒZej	d
d	„ ƒZdd„ Z
‡  ZS )ÚOptionszwpe:browserOptionsc                    s    t ƒ  ¡  d| _tj ¡ | _d S )NÚ )ÚsuperÚ__init__Ú_binary_locationr   Z	WPEWEBKITÚcopyÚ_caps©Úself©Ú	__class__© úH/tmp/pip-unpacked-wheel-3sqd7awy/selenium/webdriver/wpewebkit/options.pyr      s    
zOptions.__init__c                 C   s   | j S )N©r
   r   r   r   r   Úcapabilities   s    zOptions.capabilitiesc                 C   s   || j |< dS )zSets a capability.Nr   )r   ÚnameÚvaluer   r   r   Úset_capability"   s    zOptions.set_capabilityc                 C   s   | j S )zV
        Returns the location of the browser binary otherwise an empty string
        ©r   r   r   r   r   Úbinary_location&   s    zOptions.binary_locationc                 C   s
   || _ dS )z~
        Allows you to set the browser binary to launch

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