File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
py/selenium/webdriver/safari Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class Service(service.Service):
2828 :param port: Port for the service to run on, defaults to 0 where the operating system will decide.
2929 :param service_args: (Optional) List of args to be passed to the subprocess when launching the executable.
3030 :param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
31+ :param enable_logging: (Optional) Enable logging of the service. Logs can be located at `~/Library/Logs/com.apple.WebDriver/`
3132 """
3233
3334 def __init__ (
@@ -37,12 +38,16 @@ def __init__(
3738 service_args : typing .Optional [typing .List [str ]] = None ,
3839 env : typing .Optional [typing .Mapping [str , str ]] = None ,
3940 reuse_service = False ,
41+ enable_logging : bool = False ,
4042 driver_path_env_key : str = None ,
4143 ** kwargs ,
4244 ) -> None :
4345 self .service_args = service_args or []
4446 driver_path_env_key = driver_path_env_key or "SE_SAFARIDRIVER"
4547
48+ if enable_logging :
49+ self .service_args .append ("--diagnose" )
50+
4651 self .reuse_service = reuse_service
4752 super ().__init__ (
4853 executable_path = executable_path ,
You can’t perform that action at this time.
0 commit comments