Files
ChronoCCG/Chrono/Tests/PageObjects/BasePage.cs
T
2026-06-25 10:52:11 -04:00

22 lines
437 B
C#

using Microsoft.Playwright;
namespace Tests.PageObjects;
public abstract class BasePage
{
protected readonly IPage Page;
protected readonly string BaseUrl = "http://localhost:5256";
protected BasePage(IPage page)
{
Page = page;
}
public async Task NavigateToAsync(string path)
{
await Page.GotoAsync($"{BaseUrl}{path}");
}
public ILocator GetHeading() => Page.Locator("h1");
}