Exemplo n.º 1
0
 /// <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);
     }
 }
Exemplo n.º 2
0
 void firingDriver_ExceptionThrown(object sender, WebDriverExceptionEventArgs e)
 {
     log.AppendLine(e.ThrownException.Message);
 }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 7
0
        private void driver_ExceptionThrown(object sender, WebDriverExceptionEventArgs e)
        {

        }
Exemplo n.º 8
0
 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();
        }