
    Eg                     ~    d dl 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
 ddl	mZ d ZdZdZ G d	 d
e          ZdS )    N)ChromiumDriver)DesiredCapabilities)DriverFinder   Options)DEFAULT_EXECUTABLE_PATH)Servicec            	       P     e Zd ZdZeedddeddef	dede	ddf fdZ
defdZ xZS )	WebDriverzControls the ChromeDriver and allows you to drive the browser.

    You will need to download the ChromeDriver executable from
    http://chromedriver.storage.googleapis.com/index.html
    Noptionsservicereturnc
                    |dk    rt          j        dt          d           |rt          j        dt          d           |}|	t          k    rt          j        dt          d           nd}	|s|                                 }|st          ||||          }t          j        ||          |_        t                      
                    t          j        d         d	|||||||		  	         d
S )a  Creates a new instance of the chrome driver. Starts the service and
        then creates new instance of chrome driver.

        :Args:
         - executable_path - Deprecated: path to the executable. If the default is used it assumes the executable is in the $PATH
         - port - Deprecated: port you would like the service to run, if left as 0, a free port will be found.
         - options - this takes an instance of ChromeOptions
         - service - Service object for handling the browser driver if you need to pass extra details
         - service_args - Deprecated: List of args to pass to the driver service
         - desired_capabilities - Deprecated: Dictionary object with non-browser specific
           capabilities only, such as "proxy" or "loggingPref".
         - service_log_path - Deprecated: Where to log information from the driver.
         - keep_alive - Deprecated: Whether to configure ChromeRemoteConnection to use HTTP keep-alive.
        chromedriverzDexecutable_path has been deprecated, please pass in a Service object   )
stacklevelz%use options instead of chrome_optionsz?keep_alive has been deprecated, please pass in a Service objectTbrowserNamegoogN)warningswarnDeprecationWarningDEFAULT_KEEP_ALIVEcreate_optionsr
   r   get_pathpathsuper__init__r   CHROME)selfexecutable_pathportr   service_argsdesired_capabilitiesservice_log_pathchrome_optionsr   
keep_alive	__class__s             X/var/www/sysmax/venv/lib/python3.11/site-packages/selenium/webdriver/chrome/webdriver.pyr   zWebDriver.__init__'   s(   4 n,,MVXjwx     	%MACUbcdddd$G+++MQSers     J 	,))++G 	Uot\CSTTG#,Wg>>&}5 
	
 
	
 
	
 
	
 
	
    c                     t                      S )Nr   )r    s    r)   r   zWebDriver.create_options`   s    yyr*   )__name__
__module____qualname____doc__r	   DEFAULT_PORTDEFAULT_SERVICE_LOG_PATHr   r   r
   r   r   __classcell__)r(   s   @r)   r   r       s          0!1%7
 7
 	7
 7
 
7
 7
 7
 7
 7
 7
r        r*   r   )r   %selenium.webdriver.chromium.webdriverr   .selenium.webdriver.common.desired_capabilitiesr   'selenium.webdriver.common.driver_finderr   r   r   r   r	   r
   r0   r1   r   r    r*   r)   <module>r7      s   "  @ @ @ @ @ @ N N N N N N @ @ @ @ @ @       , , , , , ,        A A A A A A A A A Ar*   