本文整理汇总了C#中IWebElement.ToDriver方法的典型用法代码示例。如果您正苦于以下问题:C# IWebElement.ToDriver方法的具体用法?C# IWebElement.ToDriver怎么用?C# IWebElement.ToDriver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IWebElement
的用法示例。
在下文中一共展示了IWebElement.ToDriver方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: KendoTreeView
/// <summary>
/// Initializes a new instance of the <see cref="KendoTreeView"/> class.
/// </summary>
/// <param name="webElement">The webElement</param>
public KendoTreeView(IWebElement webElement)
: base(webElement.ToDriver() as RemoteWebDriver, null)
{
this.webElement = webElement;
var id = webElement.GetAttribute("id");
this.kendoTreeView = string.Format(CultureInfo.InvariantCulture, "$('#{0}').data('kendoTreeView')", id);
}
示例2: KendoSelect
/// <summary>
/// Initializes a new instance of the <see cref="KendoSelect"/> class.
/// </summary>
/// <param name="webElement">The webElement</param>
protected KendoSelect(IWebElement webElement)
: base(webElement.ToDriver() as RemoteWebDriver, null)
{
this.webElement = webElement;
var id = this.webElement.GetHiddenElement(new ElementLocator(Locator.XPath, "./ancestor-or-self::span[contains(@class, 'k-widget')]//input[@id]")).GetAttribute("id");
this.elementCssSelector = string.Format(CultureInfo.InvariantCulture, "#{0}", id);
}
示例3: Select
/// <summary>
/// Initializes a new instance of the <see cref="Select"/> class.
/// </summary>
/// <param name="webElement">The webElement.</param>
public Select(IWebElement webElement)
: base(webElement.ToDriver() as RemoteWebDriver, null)
{
this.webElement = webElement;
}
示例4: Checkbox
/// <summary>
/// Initializes a new instance of the <see cref="Checkbox"/> class.
/// </summary>
/// <param name="webElement">The webElement.</param>
public Checkbox(IWebElement webElement)
: base(webElement.ToDriver() as RemoteWebDriver, null)
{
this.webElement = webElement;
}