26 lines
541 B
C#
26 lines
541 B
C#
using Microsoft.Playwright;
|
|
|
|
namespace Tests.PageObjects;
|
|
|
|
public class DecksPage : BasePage
|
|
{
|
|
public DecksPage(IPage page) : base(page)
|
|
{
|
|
}
|
|
|
|
public async Task GotoAsync()
|
|
{
|
|
await NavigateToAsync("/decks");
|
|
}
|
|
|
|
public ILocator GetDeckCards()
|
|
{
|
|
return Page.Locator(".deck-card");
|
|
}
|
|
|
|
public async Task ClickDeckByNameAsync(string name)
|
|
{
|
|
await Page.Locator(".deck-card-title").GetByText(name, new LocatorGetByTextOptions { Exact = true })
|
|
.ClickAsync();
|
|
}
|
|
} |