28 lines
610 B
C#
28 lines
610 B
C#
using Microsoft.Playwright;
|
|
using Microsoft.Playwright.NUnit;
|
|
using NUnit.Framework;
|
|
|
|
namespace PlaywrightDotNetDemo;
|
|
|
|
public class NunitPlaywright : PageTest
|
|
{
|
|
[SetUp]
|
|
public async Task Setup()
|
|
{
|
|
await Page.GotoAsync("http://eaapp.somee.com");
|
|
}
|
|
|
|
[Test]
|
|
public async Task Test1()
|
|
{
|
|
await Page.ClickAsync("text=Login");
|
|
|
|
await Page.FillAsync("#UserName", "admin");
|
|
await Page.FillAsync("#Password", "password");
|
|
await Page.ClickAsync("text=Log in");
|
|
|
|
await Expect(Page.Locator("text='Employee Details'")).ToBeVisibleAsync();
|
|
|
|
}
|
|
|
|
} |