a
    &hg	                     @   s\   d dl mZ d dlmZ d dlmZ d dlmZ	 ddl
mZ ddlmZ G dd	 d	e	ZdS )
    N)Optional)DriverFinder)	WebDriver   )Options)Servicec                       sH   e Zd ZdZdee d fddZ fddZdd	 Zd
d Z	  Z
S )r   zAControls the WebKitGTKDriver and allows you to drive the browser.N)servicec                    sZ   |r|nt  }|r|nt | _t| j| | j_| j  t j| jj	|d d| _
dS )a2  Creates a new instance of the WebKitGTK driver.

        Starts the service and then creates new instance of WebKitGTK Driver.

        :Args:
         - options : an instance of WebKitGTKOptions
         - service : Service object for handling the browser driver if you need to pass extra details
        )command_executoroptionsFN)r   r   r   r   get_driver_pathpathstartsuper__init__service_url
_is_remote)selfr
   r   	__class__ k/var/www/html/swiplay.fr/scambot/venv/lib/python3.9/site-packages/selenium/webdriver/webkitgtk/webdriver.pyr      s    
zWebDriver.__init__c                    sD   z2zt    W n tjy$   Y n0 W | j  n| j  0 dS )z{Closes the browser and shuts down the WebKitGTKDriver executable
        that is started when starting the WebKitGTKDriver.N)r   quithttp_clientBadStatusLiner   stop)r   r   r   r   r   5   s
    zWebDriver.quitc                 O   s   t d S NNotImplementedErrorr   argskwargsr   r   r   download_file?   s    zWebDriver.download_filec                 O   s   t d S r   r   r   r   r   r   get_downloadable_filesB   s    z WebDriver.get_downloadable_files)NN)__name__
__module____qualname____doc__r   r   r   r   r!   r"   __classcell__r   r   r   r   r      s     
r   )http.clientclientr   typingr   'selenium.webdriver.common.driver_finderr   #selenium.webdriver.remote.webdriverr   RemoteWebDriverr
   r   r   r   r   r   r   r   <module>   s   