o
    US`c                     @   s,   d dl mZ d dlmZ G dd deZdS )    )DesiredCapabilities)
ArgOptionsc                       sb   e Zd ZdZd fddZedd Zddd	Zedefd
dZ	e	j
dddZ	dd Z  ZS )Optionszwpe:browserOptionsreturnNc                    s    t    d| _tj | _d S )N )super__init___binary_locationr   Z	WPEWEBKITcopy_capsself	__class__ O/usr/local/lib/python3.10/dist-packages/selenium/webdriver/wpewebkit/options.pyr      s   
zOptions.__init__c                 C      | 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   r   )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)r   N)__name__
__module____qualname__r   r   propertyr   r   strr   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   