@@ -26,12 +26,13 @@ class Service(service.ChromiumService):
2626 """A Service class that is responsible for the starting and stopping of
2727 `msedgedriver`.
2828
29- :param executable_path: install path of the msedgedriver executable, defaults to `msedgedriver`.
30- :param port: Port for the service to run on, defaults to 0 where the operating system will decide.
31- :param log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file.
32- :param service_args: (Optional) Sequence 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- :param driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable.
29+ Args:
30+ executable_path: Install path of the msedgedriver executable, defaults to `msedgedriver`.
31+ port: Port for the service to run on, defaults to 0 where the operating system will decide.
32+ log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file.
33+ service_args: (Optional) Sequence of args to be passed to the subprocess when launching the executable.
34+ env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
35+ driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable.
3536 """
3637
3738 def __init__ (
@@ -44,6 +45,7 @@ def __init__(
4445 driver_path_env_key : Optional [str ] = None ,
4546 ** kwargs ,
4647 ) -> None :
48+ """Initialize Edge service with the specified parameters."""
4749 self ._service_args = list (service_args or [])
4850 driver_path_env_key = driver_path_env_key or "SE_EDGEDRIVER"
4951
@@ -59,10 +61,21 @@ def __init__(
5961
6062 @property
6163 def service_args (self ) -> Sequence [str ]:
64+ """Returns:
65+ The sequence of service arguments.
66+ """
6267 return self ._service_args
6368
6469 @service_args .setter
6570 def service_args (self , value : Sequence [str ]):
71+ """Sets the service arguments for the Edge driver.
72+
73+ Args:
74+ value: A sequence of strings representing service arguments.
75+
76+ Raises:
77+ TypeError: If value is not a sequence or is a string.
78+ """
6679 if isinstance (value , str ) or not isinstance (value , Sequence ):
6780 raise TypeError ("service_args must be a sequence" )
6881 self ._service_args = list (value )
0 commit comments