Atata 2.13.0 is Released

December 5, 2023 by Yevgeniy Shunevych

Atata 2.13.0 is released with reliability improvements and few other features.


New features

  • major #794 Add driver creation retry functionality
  • minor #795 Add SetAsCurrent method to AtataContext
  • major #796 Add driver initial health check functionality
  • major #797 Replace log consumer configuration method WithoutSectionFinish() with WithSectionEnd(LogSectionEndOption logSectionEnd)
  • minor #798 Add OnRefreshed navigation method

Driver creation retry functionality

The functionality of driver creation retries was added. From now on, when driver creation fails with an exception, 2 more attempts are taken to retry driver creation. It can help reduce the number of test setup failures, as rarely driver constructors can throw exception.

The following configuration method was added to the base DriverAtataContextBuilder<TBuilder> class:

public TBuilder WithCreateRetries(int createRetries);

The method specifies the count of possible driver creation retries in case exceptions occur during creation. The default value is 2. Set 0 to omit retries.



Driver initial health check functionality

This feature adds an initial check of driver state to ensure that it is working. The primary goal of this feature is to handle “no such execution context” WebDriverException that recently happens with Chrome, rarely, but anyway it happens. So after driver is created we can request some driver property to ensure it doesn’t throw exception. This functionality works together with the driver creation retry functionality, which means that in case of health check failure the driver can be recreated and new one checked again.

By default this functionality is disabled. It can be enabled for particular driver(s).

Configuration methods

2 methods were added to the base DriverAtataContextBuilder<TBuilder> class:

public TBuilder WithInitialHealthCheck(bool enable = true);

public TBuilder WithInitialHealthCheckFunction(Func<IWebDriver, bool> function);

WithInitialHealthCheck - enables or disables an initial health check. By default it is disabled.

WithInitialHealthCheckFunction - sets the initial health check function. The default function requests IWebDriver.Url.



Replaced log consumer configuration method WithoutSectionFinish() with WithSectionEnd(LogSectionEndOption)

Before, there were 2 options to log section end: include or exclude. The third option is added now: “Include log section end only for block sections”. Currently “block” log sections are: StepLogSection, SetupLogSection and AggregateAssertionLogSection. The new option can be useful in reporters logging, like ExtentReports, to simplify logs.

WithoutSectionFinish() method became obsolete and new WithSectionEnd(LogSectionEndOption logSectionEnd) was added with the following options:

public enum LogSectionEndOption

New OnRefreshed navigation method

The new method was added to Go and AtataNavigator classes:

public T OnRefreshed<T>()
    where T : PageObject<T>;

Continues with the specified page object type with rage refresh. Firstly, checks whether the current AtataContext.PageObject is T, if it is, returns it; otherwise, creates a new instance of T without navigation. Then a page is refreshed. The method is useful in case when you reuse a single test suite driver by tests and want to refresh a page on start of each test to ensure that the page is in clean start state.