本文整理汇总了C#中FluentAutomation.ElementProxy类的典型用法代码示例。如果您正苦于以下问题:C# ElementProxy类的具体用法?C# ElementProxy怎么用?C# ElementProxy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ElementProxy类属于FluentAutomation命名空间,在下文中一共展示了ElementProxy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Count
public void Count(ElementProxy element, int count)
{
Parallel.ForEach(element.Elements, e =>
{
this.BuildAssertProvider(e.Item1).Count(new ElementProxy(e.Item1, e.Item2), count);
});
}
示例2: AppendText
public void AppendText(ElementProxy element, string text)
{
this.RepackExceptions(() => Parallel.ForEach(element.Elements, e =>
{
e.Item1.AppendText(new ElementProxy(e.Item1, e.Item2), text);
}));
}
示例3: Value
public void Value(ElementProxy element, string value)
{
Parallel.ForEach(element.Elements, e =>
{
this.BuildAssertProvider(e.Item1).Value(new ElementProxy(e.Item1, e.Item2), value);
});
}
示例4: RightClick
public IActionSyntaxProvider RightClick(ElementProxy element)
{
this.commandProvider.RightClick(element);
return this;
}
示例5: Text
public void Text(ElementProxy element, string text)
{
Parallel.ForEach(element.Elements, e =>
{
this.BuildAssertProvider(e.Item1).Text(new ElementProxy(e.Item1, e.Item2), text);
});
}
示例6: On
/// <summary>
/// Specified <paramref name="element"/> that should have matching CSS class.
/// </summary>
/// <param name="element">IElement factory function.</param>
public AssertSyntaxProvider On(ElementProxy element)
{
if (this.notMode)
this.assertProvider.NotCssProperty(element, this.propertyName, this.propertyValue);
else
this.assertProvider.CssProperty(element, this.propertyName, this.propertyValue);
return this.assertSyntaxProvider;
}
示例7: Exists
/// <summary>
/// Assert the element specified does not exist.
/// </summary>
/// <param name="selector">Element reference.</param>
public AssertSyntaxProvider Exists(ElementProxy element)
{
this.assertProvider.NotExists(element);
return this.assertSyntaxProvider;
}
示例8: Attribute
public void Attribute(ElementProxy element, string attributeName, string attributeValue)
{
Parallel.ForEach(this.providers, x => this.BuildAssertProvider(x.Key).Attribute(element, attributeName, attributeValue));
}
示例9: Upload
public IActionSyntaxProvider Upload(ElementProxy element, string fileName)
{
return this.Upload(element, 0, 0, fileName);
}
示例10: To
/// <summary>
/// End Drag/Drop operation at specified <paramref name="targetElement"/>.
/// </summary>
/// <param name="targetElement">IElement factory function.</param>
public IActionSyntaxProvider To(ElementProxy targetElement)
{
if (this.offsetX != 0 || this.offsetY != 0)
{
this.syntaxProvider.commandProvider.DragAndDrop(this.sourceElement, offsetX, offsetY, targetElement, 0, 0);
}
else
{
this.syntaxProvider.commandProvider.DragAndDrop(this.sourceElement, targetElement);
}
return this.syntaxProvider;
}
示例11: DragDropSyntaxProvider
internal DragDropSyntaxProvider(ActionSyntaxProvider syntaxProvider, ElementProxy element)
{
this.syntaxProvider = syntaxProvider;
this.sourceElement = element;
}
示例12: CssClass
public void CssClass(ElementProxy element, string className)
{
Parallel.ForEach(element.Elements, e =>
{
this.BuildAssertProvider(e.Item1).CssClass(new ElementProxy(e.Item1, e.Item2), className);
});
}
示例13: Visible
public void Visible(ElementProxy element)
{
Parallel.ForEach(this.providers, x => this.BuildAssertProvider(x.Key).Visible(element));
}
示例14: From
/// <summary>
/// Select from specified <paramref name="element"/>.
/// </summary>
/// <param name="element">IElement factory function.</param>
public IActionSyntaxProvider From(ElementProxy element)
{
if (this.mode == SelectionOption.Value)
{
if (this.value is string)
{
this.syntaxProvider.commandProvider.SelectValue(element, this.value);
}
else if (this.value is string[])
{
this.syntaxProvider.commandProvider.MultiSelectValue(element, this.value);
}
}
else if (this.mode == SelectionOption.Text)
{
if (this.value is string)
{
this.syntaxProvider.commandProvider.SelectText(element, this.value);
}
else if (this.value is string[])
{
this.syntaxProvider.commandProvider.MultiSelectText(element, this.value);
}
}
else if (this.value is int)
{
this.syntaxProvider.commandProvider.SelectIndex(element, this.value);
}
else if (this.value is int[])
{
this.syntaxProvider.commandProvider.MultiSelectIndex(element, this.value);
}
return this.syntaxProvider;
}
示例15: Scroll
public IActionSyntaxProvider Scroll(ElementProxy element)
{
this.commandProvider.Hover(element);
return this;
}