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
U
\±dS ã@sHUddlZddlZddlZddlmZdZeed<Gdd„dejƒZdS)éN)Úservicez/usr/bin/safaridriverÚDEFAULT_EXECUTABLE_PATHc    seZdZdZeddddfeeeej    ej
eej    ej eefddœ‡fdd„ Z e ddœd    d
„ƒZej
edœd d „Zeedœd d„ƒZ‡ZS)ÚServicea‡A Service class that is responsible for the starting and stopping of
    `safaridriver`  This is only supported on MAC OSX.
 
    :param executable_path: install path of the safaridriver executable, defaults to `/usr/bin/safaridriver`.
    :param port: Port for the service to run on, defaults to 0 where the operating system will decide.
    :param quiet: Suppress driver stdout & stderr, redirects to os.devnull if enabled.
    :param service_args: (Optional) List of args to be passed to the subprocess when launching the executable.
    :param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
    rFN)Úexecutable_pathÚportÚquietÚ service_argsÚenvÚreturnc sV| |¡|pg|_||_|js&tjnttjddd}tƒj    f||||dœ|—ŽdS)NÚwzutf-8)Úencoding)Ú
executablerÚlog_filer    )
Ú_check_executablerrÚ
subprocessÚPIPEÚopenÚosÚdevnullÚsuperÚ__init__)Úselfrrrrr    Úkwargsr©Ú    __class__©úXd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/safari/service.pyr&s    
 
üûzService.__init__)r
cCs*tj |¡s&d|krd}nd}t|ƒ‚dS)NzSafari Technology Previewz}Safari Technology Preview does not seem to be installed. You can download it at https://developer.apple.com/safari/download/.zˆSafariDriver was not found; are you running Safari 10 or later? You can download Safari at https://developer.apple.com/safari/download/.)rÚpathÚexistsÚ    Exception)rÚmessagerrrr;s
 zService._check_executablecCsd|j›g|jS)Nz-p)rr©rrrrÚcommand_line_argsDszService.command_line_argscCs d|j›S)z)Gets the url of the SafariDriver Service.zhttp://localhost:)rr!rrrÚ service_urlGszService.service_url)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚstrÚintÚboolÚtypingÚOptionalÚListÚMappingrÚ staticmethodrr"Úpropertyr#Ú __classcell__rrrrrs& úør)    rrr+Zselenium.webdriver.commonrrr(Ú__annotations__rrrrrÚ<module>s