Skip to content

Commit

Permalink
Updating logging prefs capability in .NET ChromiumOptions class
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Jul 8, 2019
1 parent c8caa95 commit fafa447
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dotnet/src/webdriver/Chromium/ChromiumOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public abstract class ChromiumOptions : DriverOptions
/// Gets the name of the capability used to store Chromium options in
/// an <see cref="ICapabilities"/> object.
/// </summary>
private const string DefaultCapability = "goog:chromeOptions";
public const string DefaultCapability = "goog:chromeOptions";
public const string LoggingPreferencesChromeOption = "goog:loggingPrefs";

private const string DefaultBrowserNameValue = "chrome";

Expand Down Expand Up @@ -74,6 +75,7 @@ public ChromiumOptions(string browserName = DefaultBrowserNameValue, string capa
this.Capability = capabilityKey;
this.AddKnownCapabilityName(capabilityKey, "current ChromeOptions class instance");
this.AddKnownCapabilityName(CapabilityType.LoggingPreferences, "SetLoggingPreference method");
this.AddKnownCapabilityName(ChromiumOptions.LoggingPreferencesChromeOption, "SetLoggingPreference method");
this.AddKnownCapabilityName(ChromiumOptions.ArgumentsChromeOption, "AddArguments method");
this.AddKnownCapabilityName(ChromiumOptions.BinaryChromeOption, "BinaryLocation property");
this.AddKnownCapabilityName(ChromiumOptions.ExtensionsChromeOption, "AddExtensions method");
Expand Down Expand Up @@ -552,7 +554,7 @@ public override ICapabilities ToCapabilities()
Dictionary<string, object> loggingPreferences = this.GenerateLoggingPreferencesDictionary();
if (loggingPreferences != null)
{
capabilities.SetCapability(CapabilityType.LoggingPreferences, loggingPreferences);
capabilities.SetCapability(LoggingPreferencesChromeOption, loggingPreferences);
}

return capabilities.AsReadOnly();
Expand Down

0 comments on commit fafa447

Please sign in to comment.