B
     ¸hô  ã               @   s<   d dl mZ d dlmZ G dd„ deƒZG dd„ deƒZdS )é    )ÚOptions)ÚDesiredCapabilitiesc               @   s‚   e Zd ZdZdd„ Zedd„ ƒZdd„ Zedd	„ ƒZej	d
d	„ ƒZedd„ ƒZ
e
j	dd„ ƒZ
edd„ ƒZej	dd„ ƒZdd„ ZdS )r   ZoperaOptionsc             C   s,   t  | ¡ d| _d| _d| _tj ¡ | _d S )NÚ )	ÚChromeOptionsÚ__init__Ú_android_package_nameÚ_android_device_socketÚ_android_command_line_filer   ÚOPERAÚcopyÚ_caps)Úself© r   ú]C:\Users\sanjo\AppData\Local\Qlobot\Launcher\ext_packages\selenium\webdriver\opera\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.N)r   )r   ÚnameÚvaluer   r   r   Úset_capability$   s    zOptions.set_capabilityc             C   s   | j S )z7
        Returns the name of the Opera package
        )r   )r   r   r   r   Úandroid_package_name(   s    zOptions.android_package_namec             C   s
   || _ dS )zk
        Allows you to set the package name

        :Args:
         - value: devtools socket name
        N)r   )r   r   r   r   r   r   /   s    c             C   s   | j S )z9
        Returns the name of the devtools socket
        )r   )r   r   r   r   Úandroid_device_socket9   s    zOptions.android_device_socketc             C   s
   || _ dS )zs
        Allows you to set the devtools socket name

        :Args:
         - value: devtools socket name
        N)r   )r   r   r   r   r   r   @   s    c             C   s   | j S )z;
        Returns the path of the command line file
        )r	   )r   r   r   r   Úandroid_command_line_fileJ   s    z!Options.android_command_line_filec             C   s
   || _ dS )z~
        Allows you to set where the command line file lives

        :Args:
         - value: command line file path
        N)r	   )r   r   r   r   r   r   Q   s    c             C   sT   t  | ¡}| | j¡ || j }| jr0| j|d< | jr@| j|d< | jrP| j|d< |S )zŠ
            Creates a capabilities with all the options that have been set and

            returns a dictionary with everything
        ZandroidPackageZandroidDeviceSocketZandroidCommandLineFile)r   Úto_capabilitiesÚupdater   ÚKEYr   r   r   )r   r   Úopera_optionsr   r   r   r   [   s    




zOptions.to_capabilitiesN)Ú__name__Ú
__module__Ú__qualname__r   r   Úpropertyr   r   r   Úsetterr   r   r   r   r   r   r   r      s   


r   c               @   s   e Zd Zdd„ ZdS )ÚAndroidOptionsc             C   s   t  | ¡ d| _d S )Nzcom.opera.browser)r   r   r   )r   r   r   r   r   q   s    
zAndroidOptions.__init__N)r   r   r   r   r   r   r   r   r    o   s   r    N)Z!selenium.webdriver.chrome.optionsr   r   Ú.selenium.webdriver.common.desired_capabilitiesr   r    r   r   r   r   Ú<module>   s   Y