Navigation to Page by Static URL

How to perform the navigation to the page by static URL.

Given

Let’s use Atata blog URL (https://atata.io/blog/) for example.

Implementation

All you need is to add Url attribute to the page object class and pass it either relative or absoulte URL.

using Atata;

namespace SampleApp.UITests
{
    using _ = BlogPage;

    [Url("/blog/")]
    public class BlogPage : Page<_>
    {
    }
}

Assume that https://atata.io/ is the BaseUrl of AtataContext.

Usage

Just use Go.To to get to the page.

Go.To<BlogPage>();

Atata will combine base URL with relative URL of the page object and perform the navigation.