/// <summary> /// Raises the <see cref="ExceptionThrown"/> event. /// </summary> /// <param name="e">A <see cref="WebDriverExceptionEventArgs"/> that contains the event data.</param> protected virtual void OnException(WebDriverExceptionEventArgs e) { if (this.ExceptionThrown != null) { this.ExceptionThrown(this, e); } }
void firingDriver_ExceptionThrown(object sender, WebDriverExceptionEventArgs e) { log.AppendLine(e.ThrownException.Message); }
private static void ExceptionThrown(object sender, WebDriverExceptionEventArgs e) { TestWebDriver.LogMessage(LogLevel.Verbose, $"Exception: [{e.ThrownException.Message}]"); }
/// <summary> /// Raises the <see cref="E:OpenQA.Selenium.Support.Events.EventFiringWebDriver.ExceptionThrown"/> event. /// /// </summary> /// <param name="e">A <see cref="T:OpenQA.Selenium.Support.Events.WebDriverExceptionEventArgs"/> that contains the event data.</param> protected virtual void OnException(WebDriverExceptionEventArgs e) { if (this.ExceptionThrown == null) return; this.ExceptionThrown((object) this, e); }
private void driver_ExceptionThrown(object sender, WebDriverExceptionEventArgs e) { }
public static void ExceptionThrown(object sender, WebDriverExceptionEventArgs e) { Console.WriteLine("The next exception was thrown: " + e.ThrownException.Message + " InnerException: " + e.ThrownException.InnerException); }
private void OnExceptionThrown(object sender, WebDriverExceptionEventArgs webDriverExceptionEventArgs) { SeleniumLog log = SeleniumLog.Instance(); log.Indent(); log.Error().Red().WriteLine("[Selenium Event] Exception Thrown: " + webDriverExceptionEventArgs.ThrownException, take_screenshot: true); if (log.Config.OnWebdriverExceptionThrown_LogEvent) { if (_by == "XPath") { log.Red().WriteLine("Running XPath Diagnostics: Expand to see which part of XPath failed."); log.Indent(); XPathTest.Test(driver, _locator); XPathTest.DisplayResults(); log.Unindent(); } } log.Unindent(); }