Skip to content

Commit

Permalink
make async helper class public to use in support module
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed May 18, 2024
1 parent 103f8d5 commit 7101abe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dotnet/src/support/Events/EventFiringWebDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using System.Collections.ObjectModel;
using System.Drawing;
using System.Threading.Tasks;
using OpenQA.Selenium.Internal;

namespace OpenQA.Selenium.Support.Events
{
Expand Down Expand Up @@ -843,11 +844,11 @@ public EventFiringNavigation(EventFiringWebDriver driver)
}

/// <summary>
/// Move the browser back a
/// Move the browser back
/// </summary>
public void Back()
{
Task.Run(this.BackAsync).ConfigureAwait(false).GetAwaiter().GetResult();
AsyncHelper.RunSync(this.BackAsync);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/Internal/AsyncHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace OpenQA.Selenium.Internal
/// <summary>
/// Encapsulates methods for working with asynchronous tasks.
/// </summary>
internal static class AsyncHelper
public static class AsyncHelper
{
private static readonly TaskFactory _myTaskFactory = new TaskFactory(CancellationToken.None,
TaskCreationOptions.None, TaskContinuationOptions.None, TaskScheduler.Default);
Expand Down

0 comments on commit 7101abe

Please sign in to comment.