Skip to content

Commit 528bea6

Browse files
authored
Merge branch 'SeleniumHQ:trunk' into py-fix-proxy-auth-special-chars
2 parents 0252a0a + 2ab802b commit 528bea6

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

dotnet/src/webdriver/Chromium/ChromiumDriverService.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ protected ChromiumDriverService(string? executablePath, string? executableFileNa
9595
/// </summary>
9696
public string? AllowedIPAddresses { get; set; }
9797

98+
/// <summary>
99+
/// Adds readable timestamps to log
100+
/// </summary>
101+
public bool ReadableTimestamp { get; set; }
102+
98103
/// <summary>
99104
/// Gets the command-line arguments for the driver service.
100105
/// </summary>
@@ -128,6 +133,11 @@ protected override string CommandLineArguments
128133
argsBuilder.Append(" --append-log");
129134
}
130135

136+
if (this.ReadableTimestamp)
137+
{
138+
argsBuilder.Append(" --readable-timestamp");
139+
}
140+
131141
if (!string.IsNullOrEmpty(this.LogPath))
132142
{
133143
argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --log-path=\"{0}\"", this.LogPath);

dotnet/src/webdriver/Firefox/FirefoxDriverService.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ protected override DriverOptions GetDefaultDriverOptions()
103103
/// </remarks>
104104
public string? LogPath { get; set; }
105105

106+
/// <summary>
107+
/// Disable truncation of long log lines in GeckoDriver.
108+
/// </summary>
109+
public bool LogNoTruncate { get; set; }
110+
111+
/// <summary>
112+
/// Directory in which GeckoDriver creates profiles.
113+
/// </summary>
114+
public string? ProfileRoot { get; set; }
115+
106116
/// <summary>
107117
/// Gets or sets the level at which log output is displayed.
108118
/// </summary>
@@ -189,6 +199,21 @@ protected override string CommandLineArguments
189199
argsBuilder.Append(" --jsdebugger");
190200
}
191201

202+
if (this.LogNoTruncate)
203+
{
204+
argsBuilder.Append(" --log-no-truncate");
205+
}
206+
207+
if (!string.IsNullOrEmpty(this.ProfileRoot))
208+
{
209+
if (!Directory.Exists(this.ProfileRoot))
210+
{
211+
throw new ArgumentException($"Profile root directory does not exist: {this.ProfileRoot}", nameof(ProfileRoot));
212+
}
213+
214+
argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --profile-root \"{0}\"", this.ProfileRoot);
215+
}
216+
192217
return argsBuilder.ToString().Trim();
193218
}
194219
}

0 commit comments

Comments
 (0)