Debian Codegraph @

selenium/webdriver/edge/service.py

raw symbols SCIP
1 # Licensed to the Software Freedom Conservancy (SFC) under one
2 # or more contributor license agreements. See the NOTICE file
3 # distributed with this work for additional information
4 # regarding copyright ownership. The SFC licenses this file
5 # to you under the Apache License, Version 2.0 (the
6 # "License"); you may not use this file except in compliance
7 # with the License. You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
16 # under the License.
17 import typing
18
19 from selenium.types import SubprocessStdAlias
20 from selenium.webdriver.chromium import service
21
22
23 class Service(service.ChromiumService):
24 """A Service class that is responsible for the starting and stopping of
25 `msedgedriver`.
26
27 :param executable_path: install path of the msedgedriver executable, defaults to `msedgedriver`.
28 :param port: Port for the service to run on, defaults to 0 where the operating system will decide.
29 :param verbose: (Deprecated) Whether to make the webdriver more verbose (passes the --verbose option to the binary).
30 Defaults to False.
31 :param log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file.
32 :param service_args: (Optional) List of args to be passed to the subprocess when launching the executable.
33 :param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
34 """
35
36 def __init__(
37 self,
38 executable_path: str = None,
39 port: int = 0,
40 log_output: SubprocessStdAlias = None,
41 service_args: typing.Optional[typing.List[str]] = None,
42 env: typing.Optional[typing.Mapping[str, str]] = None,
43 **kwargs,
44 ) -> None:
45 self.service_args = service_args or []
46
47 super().__init__(
48 executable_path=executable_path,
49 port=port,
50 service_args=service_args,
51 log_output=log_output,
52 env=env,
53 **kwargs,
54 )