Atata 3.1.0 is released with async log section methods and upgrade of Selenium.WebDriver.
Changelog
Added
- minor
#836 Add
ExecuteSectionAsyncmethods toILogManager - minor
#837 Add
SetupAsyncandStepAsyncmethods toReport<TOwner>
Changed
- minor #838 Upgrade Selenium.WebDriver package reference to v4.20.0
New methods for asynchronous log sections
ILogManager
In addition to ExecuteSection methods of ILogManager new async method versions are added:
Task ExecuteSectionAsync(LogSection section, Func<Task> function);
Task<TResult> ExecuteSectionAsync<TResult>(LogSection section, Func<Task<TResult>> function);
Usage
await AtataContext.Current.Log.ExecuteSectionAsync(
new LogSection("Do some async work without result"),
async () =>
{
//...
});
var result = await AtataContext.Current.Log.ExecuteSectionAsync(
new LogSection("Do some async work with result"),
async () =>
{
return await SomeActionAsync();
});
Report<TOwner>
In addition to Setup and Step methods of Report<TOwner> new async method versions are added:
public Task SetupAsync(string message, Func<TOwner, Task> function);
public Task<TResult> SetupAsync<TResult>(string message, Func<TOwner, Task<TResult>> function);
public Task StepAsync(string message, Func<TOwner, Task> function);
public Task<TResult> StepAsync<TResult>(string message, Func<TOwner, Task<TResult>> function);