public static void AcceptAlertIfPresent(this WebApplication webApplication, int timeOutInMs = 1000) { if (webApplication.IsAlertPresent(timeOutInMs)) { webApplication.AcceptAlert(); } }