
    >fh	                     b    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e	      Zy)	    N)Optional)DriverFinder)	WebDriver)Options)Servicec                   J     e Zd ZdZ	 	 ddee   f fdZ fdZd Zd Z	 xZ
S )r   zAControls the WebKitGTKDriver and allows you to drive the browser.servicec                 :   |r|n	t               }|r|n	t               | _        t        | j                  |      j	                         | j                  _        | j                  j                          t        | !  | j                  j                  |       d| _
        y)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__s      Y/var/www/zara/venv/lib/python3.12/site-packages/selenium/webdriver/webkitgtk/webdriver.pyr   zWebDriver.__init__   sp     %'')")wwy(w?OOQ$,,*B*BGT    c                     	 t         |           | j                  j                          y# t        j                  $ r Y 0w xY w# | j                  j                          w xY w)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   s    r   r   zWebDriver.quit4   sP    	 GLN LL (( 		 LLs    , AA AA A!c                     t         NNotImplementedErrorr   argskwargss      r   download_filezWebDriver.download_file>       !!r   c                     t         r   r   r!   s      r   get_downloadable_filesz WebDriver.get_downloadable_filesA   r%   r   )NN)__name__
__module____qualname____doc__r   r   r   r   r$   r'   __classcell__)r   s   @r   r   r      s1    K %)  '" , ""r   r   )http.clientclientr   typingr   'selenium.webdriver.common.driver_finderr   #selenium.webdriver.remote.webdriverr   RemoteWebDriver$selenium.webdriver.webkitgtk.optionsr   $selenium.webdriver.webkitgtk.servicer    r   r   <module>r6      s%   $ "  @ L 8 8'" '"r   