79634332

Date: 2025-05-22 18:32:03
Score: 0.5
Natty:
Report link
[SetUp]
public async Task SetUp()
{
  var browser = await Playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions { Headless = true });
  var context = await browser.NewContextAsync();
  var page = await context.NewPageAsync();

  // Navigate to the website
  await Page.GotoAsync("https://automationexercise.com/");

  // Wait for the popup and click "Consent"
  // Adjust the selector if needed
  var consentButton = Page.Locator("button:has-text('Consent')");
  if (await consentButton.IsVisibleAsync())
  {
    await consentButton.ClickAsync();
  }
}
 [Test]
 public async Task Verify_NewUser()
 {
   await Expect(Page.Locator("text= Signup / Login")).ToBeVisibleAsync(); 
   await Page.Locator("text= Signup / Login").ClickAsync(); 
   await Expect(Page.Locator("h2:has-text('New User Signup!')")).ToBeVisibleAsync(); 


 }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Inconsequential Stuff