How to perform the navigation to the page by static URL.
Let’s use Atata blog URL (https://atata.io/blog/
) for example.
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
.
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.