Skip to content

Commit

Permalink
[dotnet] Suppressed not yet initialized safari driver service in inte…
Browse files Browse the repository at this point in the history
…rnal logs
  • Loading branch information
nvborisenko committed Oct 3, 2024
1 parent 10d5f8c commit 798cf1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/DriverService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected virtual bool IsInitialized
}
catch (Exception ex) when (ex is HttpRequestException || ex is TaskCanceledException)
{
// do nothing: the exception is expected, meaning driver service is not initialized
// Do nothing. The exception is expected, meaning driver service is not initialized.
}

return isInitialized;
Expand Down
8 changes: 1 addition & 7 deletions dotnet/src/webdriver/Safari/SafariDriverService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
// </copyright>

using OpenQA.Selenium.Internal;
using OpenQA.Selenium.Internal.Logging;
using System;
using System.IO;
using System.Net;
Expand All @@ -34,8 +33,6 @@ public sealed class SafariDriverService : DriverService
{
private const string DefaultSafariDriverServiceExecutableName = "safaridriver";

private readonly static ILogger logger = Log.GetLogger<SafariDriverService>();

/// <summary>
/// Initializes a new instance of the <see cref="SafariDriverService"/> class.
/// </summary>
Expand Down Expand Up @@ -130,10 +127,7 @@ protected override bool IsInitialized
// check.
catch (Exception ex) when (ex is HttpRequestException || ex is TaskCanceledException)
{
if (logger.IsEnabled(LogEventLevel.Trace))
{
logger.Trace(ex.ToString());
}
// Do nothing. The exception is expected, meaning driver service is not initialized.
}
}
}
Expand Down

0 comments on commit 798cf1c

Please sign in to comment.