Atata 2.12.0 is released with new navigation methods, deprecation of some APIs, and bug fix.
Changelog
New features
- major
#791 Add
On
andOnOrTo
navigation methods
Changes and enhancements
- minor
#786 Add
(string directoryPath)
constructor toAddDirectoryFilesToNUnitTestContextEventHandler
- major
#787 Deprecate some and provide new log methods to
Report<TOwner>
andILogManager
- major
#788 Deprecate
Start
andEndSection
methods ofReport<TOwner>
andILogManager
- minor
#789 Add and use
StepLogSection
andSetupLogSection
inStep
andSetup
methods ofReport<TOwner>
- minor
#790 Extract test informational properties from
AtataContext
toTestInfo
class - major #793 Use Selenium.WebDriver package v4.15.0
Fixes
- fix #792 Driver creation fails when
DriverService.DriverServicePath
isnull
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>();