Converting Tests back to C# but still with Playwright
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
namespace Tests.Pages;
|
||||
|
||||
public class DatabaseSinglePage : BasePage
|
||||
{
|
||||
public DatabaseSinglePage(Website website) : base(website) { }
|
||||
|
||||
public override string Url => "database";
|
||||
|
||||
public async Task GotoWithSearchAsync(string searchText)
|
||||
{
|
||||
await Website.GotoAsync($"{Url}/{searchText}");
|
||||
}
|
||||
|
||||
public async Task<string> GetEntityNameAsync() =>
|
||||
(await Website.FindById("entityName").InnerTextAsync()).Trim();
|
||||
|
||||
public async Task<string> GetEntityHealthAsync() =>
|
||||
(await Website.FindById("entityHealth").InnerTextAsync()).Trim();
|
||||
|
||||
public async Task<string> GetInvalidSearchAsync() =>
|
||||
(await Website.FindById("invalidSearch").InnerTextAsync()).Trim();
|
||||
|
||||
public async Task<string> GetValidSearchAsync() =>
|
||||
(await Website.FindById("validSearch").InnerTextAsync()).Trim();
|
||||
}
|
||||
Reference in New Issue
Block a user