Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to async methods for Selenium navigation #125

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/StageZero.Selenium/SeleniumNavigate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ public SeleniumNavigate(IWebDriver driver)
}

/// <inheritdoc/>
public Task Back()
public async Task Back()
{
return Task.Run(() => _driver.Navigate().Back());
await _driver.Navigate().BackAsync();
}

/// <inheritdoc/>
public Task Forward()
public async Task Forward()
{
return Task.Run(() => _driver.Navigate().Forward());
await _driver.Navigate().ForwardAsync();
}

/// <inheritdoc/>
public Task ToUrl(string url)
public async Task ToUrl(string url)
{
return Task.Run(() => _driver.Navigate().GoToUrl(url));
await _driver.Navigate().GoToUrlAsync(url);
}

/// <inheritdoc/>
public Task ToUrl(Uri uri)
public async Task ToUrl(Uri uri)
{
return Task.Run(() => _driver.Navigate().GoToUrl(uri));
await _driver.Navigate().GoToUrlAsync(uri);
}
}
}
4 changes: 2 additions & 2 deletions src/StageZero.Selenium/WebDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ public INavigate Navigate()
}

/// <inheritdoc/>
public Task Refresh()
public async Task Refresh()
{
return Task.Run(() => _seleniumDriver.Navigate().Refresh());
await _seleniumDriver.Navigate().RefreshAsync();
}

/// <inheritdoc/>
Expand Down
Loading