本文整理汇总了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);
}
}
示例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));
}
}
示例3: Navigated
private static void Navigated(object sender, WebDriverNavigationEventArgs e)
{
TestWebDriver.LogMessage(LogLevel.Verbose, $"Navigating to [{e.Url}]");
}
示例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();
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例8: firingDriver_NavigatedBack
void firingDriver_NavigatedBack(object sender, WebDriverNavigationEventArgs e)
{
log.AppendLine("Navigated back");
}
示例9: testDriver_Navigating
void testDriver_Navigating(object sender, WebDriverNavigationEventArgs e)
{
Assert.AreEqual(e.Driver, mockDriver);
}
示例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;
}
}
示例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);
}
示例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);
}
示例13: Navigating
public static void Navigating(object sender, WebDriverNavigationEventArgs e)
{
Console.WriteLine("Will navigate to " + e.Url);
}
示例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();
}
}
示例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;
}
}