Result: No dialog yet

ButtonDialogResult after AcceptResult after Dismiss
Show an alertHello from the practice page.Alert closedAlert closed
Ask to confirmDelete the item?DeletedKept
Ask for a nameYour name? (default Guest)Hello, GuestNo name given
Alert in 1.5 secondsThis alert waited 1.5 seconds.Late alert closedLate alert closed

What to practise

In VAF: browser.Should().HaveAlert().HaveText("…").Accept().

Tested in VAF-Demo

A test of this page from VAF-Demo, written with shared steps: the test says what the user does, the steps hold the VAF chains.

[Test]
public void ConfirmAcceptedDeletes()
{
    AlertsSteps.LetsAskToDelete();
    AlertsSteps.LetsAccept("Delete the item?");
    AlertsSteps.LetsCheckTheAnswer("Deleted");
}

On GitHub (opens in a new tab)