Atata 2.12.0 is Released

November 2, 2023 by Yevgeniy Shunevych


Atata 2.12.0 is released with new navigation methods, deprecation of some APIs, and bug fix.

Changelog

New features

  • major #791 Add On and OnOrTo navigation methods

Changes and enhancements

  • minor #786 Add (string directoryPath) constructor to AddDirectoryFilesToNUnitTestContextEventHandler
  • major #787 Deprecate some and provide new log methods to Report<TOwner> and ILogManager
  • major #788 Deprecate Start and EndSection methods of Report<TOwner> and ILogManager
  • minor #789 Add and use StepLogSection and SetupLogSection in Step and Setup methods of Report<TOwner>
  • minor #790 Extract test informational properties from AtataContext to TestInfo class
  • major #793 Use Selenium.WebDriver package v4.15.0

Fixes

  • fix #792 Driver creation fails when DriverService.DriverServicePath is null

New On and OnOrTo navigation methods

The new methods were added to Go and AtataNavigator classes:

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

Continues with the specified page object type. Firstly, checks whether the current AtataContext.PageObject is T, if it is, returns it; otherwise, creates a new instance of T without navigation. The method is useful in case when in a particular step method (BDD step, for example) you don’t have an instance of current page object but you are sure that a browser is on the needed page.

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

Continues with the specified page object type or navigates to it. Firstly, checks whether the current AtataContext.PageObject is T, if it is, returns it; otherwise, creates a new instance of T with navigation. The method is useful in case when in a particular step method (BDD step, for example) you don’t have an instance of current page object and you are not sure that a browser is on the needed page, but can be.

Usage

Go.OnOrTo<SomePage>();

AtataContext.Current.Go.On<SomePage>();