當前位置: 首頁>>代碼示例>>C#>>正文


C# Events.WebDriverNavigationEventArgs類代碼示例

本文整理匯總了C#中OpenQA.Selenium.Support.Events.WebDriverNavigationEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# WebDriverNavigationEventArgs類的具體用法?C# WebDriverNavigationEventArgs怎麽用?C# WebDriverNavigationEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


WebDriverNavigationEventArgs類屬於OpenQA.Selenium.Support.Events命名空間,在下文中一共展示了WebDriverNavigationEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Navigated

 private void Navigated(object sender, WebDriverNavigationEventArgs e)
 {
     foreach (var pageLoadHandler in _everyPageLoad)
     {
         pageLoadHandler.Execute(e.Url);
     }
 }
開發者ID:paulsil,項目名稱:specflow-selenium,代碼行數:7,代碼來源:WebDriverFactory.cs

示例2: driver_Navigating

 private void driver_Navigating(object sender, WebDriverNavigationEventArgs e)
 {
     Common.Delay(Config.Settings.runTimeSettings.CommandDelayMs);
     if (Config.Settings.reportSettings.commandLogging)
     {
         TestBase.LogEvent(string.Format("Navigating to url {0}", e.Url));
     }
 }
開發者ID:sakthijas,項目名稱:ProtoTest.Golem,代碼行數:8,代碼來源:EventedWebDriver.cs

示例3: Navigated

 private static void Navigated(object sender, WebDriverNavigationEventArgs e)
 {
     TestWebDriver.LogMessage(LogLevel.Verbose, $"Navigating to [{e.Url}]");
 }
開發者ID:Jayman1305,項目名稱:Selenium.Extensions,代碼行數:4,代碼來源:WebDriverManager.cs

示例4: OnNavigatingForward

 private void OnNavigatingForward(object sender, WebDriverNavigationEventArgs webDriverNavigationEventArgs)
 {
     SeleniumLog log = SeleniumLog.Instance();
     if (log.Config.OnNavigatingForward_LogBeforeEvent)
     {
         log.Indent();
         log.WriteLine("[Selenium Event]  Navigating Forward: " + webDriverNavigationEventArgs.Url, take_screenshot: log.Config.OnNavigatingForward_TakeScreenshotBeforeEvent);
         log.Unindent();
     }
 }
開發者ID:jredimer2,項目名稱:SeleniumLog_NET_Extension,代碼行數:10,代碼來源:SeleniumEventListener.cs

示例5: GoToUrl

 /// <summary>
 /// Navigate to a url for your test
 /// </summary>
 /// <param name="url">String of where you want the browser to go to</param>
 public void GoToUrl(string url)
 {
     WebDriverNavigationEventArgs e = new WebDriverNavigationEventArgs(this.parentDriver, url);
     this.parentDriver.OnNavigating(e);
     this.wrappedNavigation.GoToUrl(url);
     this.parentDriver.OnNavigated(e);
 }
開發者ID:j0hnsmith,項目名稱:Selenium2,代碼行數:11,代碼來源:EventFiringWebDriver.cs

示例6: Back

 /// <summary>
 /// Move the browser back
 /// </summary>
 public void Back()
 {
     WebDriverNavigationEventArgs e = new WebDriverNavigationEventArgs(this.parentDriver);
     this.parentDriver.OnNavigatingBack(e);
     this.wrappedNavigation.Back();
     this.parentDriver.OnNavigatedBack(e);
 }
開發者ID:j0hnsmith,項目名稱:Selenium2,代碼行數:10,代碼來源:EventFiringWebDriver.cs

示例7: OnNavigatingBack

 /// <summary>
 /// Raises the <see cref="NavigatingBack"/> event.
 /// </summary>
 /// <param name="e">A <see cref="WebDriverNavigationEventArgs"/> that contains the event data.</param>
 protected virtual void OnNavigatingBack(WebDriverNavigationEventArgs e)
 {
     if (this.NavigatingBack != null)
     {
         this.NavigatingBack(this, e);
     }
 }
開發者ID:j0hnsmith,項目名稱:Selenium2,代碼行數:11,代碼來源:EventFiringWebDriver.cs

示例8: firingDriver_NavigatedBack

 void firingDriver_NavigatedBack(object sender, WebDriverNavigationEventArgs e)
 {
     log.AppendLine("Navigated back");
 }
開發者ID:kaushik9k,項目名稱:Selenium2,代碼行數:4,代碼來源:EventFiringWebDriverTest.cs

示例9: testDriver_Navigating

 void testDriver_Navigating(object sender, WebDriverNavigationEventArgs e)
 {
     Assert.AreEqual(e.Driver, mockDriver);
 }
開發者ID:kaushik9k,項目名稱:Selenium2,代碼行數:4,代碼來源:EventFiringWebDriverTest.cs

示例10: GoToUrl

            public void GoToUrl(Uri url, string username, string password)
            {
                if (url == null)
                {
                    throw new ArgumentNullException("url", "url cannot be null");
                }

                if (url == null)
                {
                    throw new ArgumentNullException("username", "username cannot be null");
                }

                if (url == null)
                {
                    throw new ArgumentNullException("password", "password cannot be null");
                }

                try
                {
                    WebDriverNavigationEventArgs e = new WebDriverNavigationEventArgs(this.parentDriver, url.ToString());
                    this.parentDriver.OnNavigating(e);
                    this.wrappedNavigation.GoToUrl(url, username, password);
                    this.parentDriver.OnNavigated(e);
                }
                catch (Exception ex)
                {
                    this.parentDriver.OnException(new WebDriverExceptionEventArgs(this.parentDriver, ex));
                    throw;
                }
            }
開發者ID:bwp,項目名稱:SeleniumWebDriver,代碼行數:30,代碼來源:EventFiringWebDriver.cs

示例11: OnNavigatingForward

 /// <summary>
 ///     Raises the <see cref="E:OpenQA.Selenium.Support.Events.EventFiringWebDriver.NavigatingForward" /> event.
 /// </summary>
 /// <param name="e">
 ///     A <see cref="T:OpenQA.Selenium.Support.Events.WebDriverNavigationEventArgs" /> that contains the event
 ///     data.
 /// </param>
 protected virtual void OnNavigatingForward(WebDriverNavigationEventArgs e)
 {
     if (NavigatingForward == null)
         return;
     NavigatingForward(this, e);
 }
開發者ID:sakthijas,項目名稱:ProtoTest.Golem,代碼行數:13,代碼來源:EventFiringWebDriver.cs

示例12: OnNavigatedBack

 /// <summary>
 ///     Raises the <see cref="E:OpenQA.Selenium.Support.Events.EventFiringWebDriver.NavigatedBack" /> event.
 /// </summary>
 /// <param name="e">
 ///     A <see cref="T:OpenQA.Selenium.Support.Events.WebDriverNavigationEventArgs" /> that contains the event
 ///     data.
 /// </param>
 protected virtual void OnNavigatedBack(WebDriverNavigationEventArgs e)
 {
     if (NavigatedBack == null)
         return;
     NavigatedBack(this, e);
 }
開發者ID:sakthijas,項目名稱:ProtoTest.Golem,代碼行數:13,代碼來源:EventFiringWebDriver.cs

示例13: Navigating

 public static void Navigating(object sender, WebDriverNavigationEventArgs e)
 {
     Console.WriteLine("Will navigate to " + e.Url);
 }
開發者ID:koreyba,項目名稱:lottosend,代碼行數:4,代碼來源:Debugger.cs

示例14: OnNavigatedForward

 private void OnNavigatedForward(object sender, WebDriverNavigationEventArgs webDriverNavigationEventArgs)
 {
     SeleniumLog log = SeleniumLog.Instance();
     if (log.Config.OnNavigatingForward_LogAfterEvent)
     {
         log.Indent();
         log.WriteLine("[Selenium Event]  Navigate Forward Success!", take_screenshot: log.Config.OnNavigatingForward_TakeScreenshotAfterEvent);
         log.Unindent();
     }
 }
開發者ID:jredimer2,項目名稱:SeleniumLog_NET_Extension,代碼行數:10,代碼來源:SeleniumEventListener.cs

示例15: Forward

 /// <summary>
 /// Move the browser forward
 /// </summary>
 public void Forward()
 {
     try
     {
         WebDriverNavigationEventArgs e = new WebDriverNavigationEventArgs(this.parentDriver);
         this.parentDriver.OnNavigatingForward(e);
         this.wrappedNavigation.Forward();
         this.parentDriver.OnNavigatedForward(e);
     }
     catch (Exception ex)
     {
         this.parentDriver.OnException(new WebDriverExceptionEventArgs(this.parentDriver, ex));
         throw;
     }
 }
開發者ID:kaushik9k,項目名稱:Selenium2,代碼行數:18,代碼來源:EventFiringWebDriver.cs


注:本文中的OpenQA.Selenium.Support.Events.WebDriverNavigationEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。