zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
U
\±d•
ã@sFddlZddlmZddlmZddlmZdZGdd„dejƒZdS)éN)ÚList)Úservice)ÚutilsZ geckodriverc    speZdZdZeddddfeeejej    eejeejej
eefddœ‡fdd„ Z e    edœdd    „Z ‡Z S)
ÚServicea A Service class that is responsible for the starting and stopping of
    `geckodriver`.
 
    :param executable_path: install path of the geckodriver executable, defaults to `geckodriver`.
    :param port: Port for the service to run on, defaults to 0 where the operating system will decide.
    :param service_args: (Optional) List of args to be passed to the subprocess when launching the executable.
    :param log_path: (Optional) File path for the file to be opened and passed as the subprocess stdout/stderr handler,
        defaults to `geckodriver.log`.
    :param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
    rN)Úexecutable_pathÚportÚ service_argsÚlog_pathÚenvÚreturnc     sh|pd}t|ddd}|pg|_tƒjf||||dœ|—Žd|jkrd|j d¡|j t ¡›¡dS)Nzgeckodriver.logza+zutf-8)Úencoding)Ú
executablerÚlog_filer
z--connect-existingz--websocket-port)ÚopenrÚsuperÚ__init__ÚappendrZ    free_port)    Úselfrrrr    r
ÚkwargsÚfiler©Ú    __class__©úYd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/firefox/service.pyr&s
 
üû    
 zService.__init__)r cCsd|j›g|jS)Nz--port)rr)rrrrÚcommand_line_args@szService.command_line_args)Ú__name__Ú
__module__Ú __qualname__Ú__doc__ÚDEFAULT_EXECUTABLE_PATHÚstrÚintÚtypingÚOptionalrÚMappingrrÚ __classcell__rrrrrs úør)r"rZselenium.webdriver.commonrrrrrrrrÚ<module>s