public void AcceptAlert(int?timeoutInmilliseconds = null) { _waitManager.WaitAlertIsPresented(timeoutInmilliseconds); _logger.LogInfo("Accept Browser Alert"); try { _driver.SwitchTo().Alert().Accept(); } catch (Exception e) { _logger.LogError(e.ToString()); throw; } }
public string GetAlertText(int?timeoutInmilliseconds = null) { _waitManager.WaitAlertIsPresented(timeoutInmilliseconds); _logger.LogInfo(string.Format("Get text from Alert")); try { string text = _driver.SwitchTo().Alert().Text; _logger.LogInfo(string.Format("Text [{0}] get", text)); return(text); } catch (Exception e) { _logger.LogError(e.ToString()); throw; } }
protected void WaitAlertIsPresented(int?timeoutInmilliseconds = null) { _waitManager.WaitAlertIsPresented(timeoutInmilliseconds); }