U
    g                     @   s4   d dl Z d dlmZ d dlmZ G dd deZdS )    N)DesiredCapabilities)
ArgOptionsc                       sr   e Zd ZdZdd fddZeedddZejeddd	dZd
d Z	ee
jeef dddZ  ZS )Optionszwpe:browserOptionsN)returnc                    s   t    d| _d S )N )super__init___binary_locationself	__class__ H/tmp/pip-unpacked-wheel-3ysq0mf8/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)valuer   c                 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	TypeErrorZ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)Z_capsr   	argumentsr   KEY)r   ZcapsZbrowser_optionsr   r   r   to_capabilities/   s    


zOptions.to_capabilitiesc                 C   s
   t j S )N)r   Z	WPEWEBKITcopyr
   r   r   r   default_capabilities>   s    zOptions.default_capabilities)__name__
__module____qualname__r   r   propertyr   r   setterr   typingDictr   __classcell__r   r   r   r   r      s   
r   )r!   Z.selenium.webdriver.common.desired_capabilitiesr   Z!selenium.webdriver.common.optionsr   r   r   r   r   r   <module>   s   