diff --git a/dotnet/src/webdriver/Firefox/FirefoxDriverService.cs b/dotnet/src/webdriver/Firefox/FirefoxDriverService.cs index 37c99b4927618..da2ec12f282db 100644 --- a/dotnet/src/webdriver/Firefox/FirefoxDriverService.cs +++ b/dotnet/src/webdriver/Firefox/FirefoxDriverService.cs @@ -103,6 +103,16 @@ protected override DriverOptions GetDefaultDriverOptions() /// public string? LogPath { get; set; } + /// + /// Disable truncation of long log lines in GeckoDriver. + /// + public bool LogNoTruncate { get; set; } + + /// + /// Directory in which GeckoDriver creates profiles. + /// + public string? ProfileRoot { get; set; } + /// /// Gets or sets the level at which log output is displayed. /// @@ -189,6 +199,21 @@ protected override string CommandLineArguments argsBuilder.Append(" --jsdebugger"); } + if (this.LogNoTruncate) + { + argsBuilder.Append(" --log-no-truncate"); + } + + if (!string.IsNullOrEmpty(this.ProfileRoot)) + { + if (!Directory.Exists(this.ProfileRoot)) + { + throw new ArgumentException($"Profile root directory does not exist: {this.ProfileRoot}", nameof(ProfileRoot)); + } + + argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --profile-root \"{0}\"", this.ProfileRoot); + } + return argsBuilder.ToString().Trim(); } }