Atata by Yevgeniy Shunevych

<PackageReference Include="Atata" Version="2.12.0" />

.NET API 760,320 bytes

 AtataNavigator

public class AtataNavigator
Represents the navigation functionality between pages and windows.
public AtataNavigator(AtataContext context)

Initializes a new instance of the AtataNavigator class.

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

Continues with the specified page object type. Firstly, checks whether the current 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 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.

public T To<T>(T pageObject = null, string url = null, bool navigate = true, bool temporarily = false) where T : PageObject<T>

Navigates to the specified page object.

public T ToNewWindow<T>(T pageObject = null, string url = null, bool temporarily = false) where T : PageObject<T>

Navigates to a new window with the specified page object.

public T ToNewWindowAsTab<T>(T pageObject = null, string url = null, bool temporarily = false) where T : PageObject<T>

Navigates to the a tab window with the specified page object.

public T ToNextWindow<T>(T pageObject = null, bool temporarily = false) where T : PageObject<T>

Navigates to the next window with the specified page object.

public T ToPreviousWindow<T>(T pageObject = null, bool temporarily = false) where T : PageObject<T>

Navigates to the previous window with the specified page object.

public void ToUrl(string url)

Navigates to the specified URL.

public T ToWindow<T>(string windowName, bool temporarily = false) where T : PageObject<T>

Navigates to the window by name.

public T ToWindow<T>(T pageObject, string windowName, bool temporarily = false) where T : PageObject<T>

Navigates to the window with the specified page object by name.