Converting Tests back to C# but still with Playwright
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
namespace Tests.Shared;
|
||||
|
||||
public class NavigationBar
|
||||
{
|
||||
private readonly Website _website;
|
||||
public NavigationBar(Website website) => _website = website;
|
||||
|
||||
public ILocator SearchButton => _website.Locator("#desktop-searchButton");
|
||||
|
||||
public async Task ClickHomeLinkAsync()
|
||||
{
|
||||
await _website.Locator("a:has-text(\"IGP Fan Reference\")").ClickAsync();
|
||||
}
|
||||
|
||||
public async Task<SearchDialog> ClickSearchButtonAsync()
|
||||
{
|
||||
await SearchButton.ClickAsync();
|
||||
return _website.SearchDialog;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user