本文整理汇总了C#中Step.AddOpt方法的典型用法代码示例。如果您正苦于以下问题:C# Step.AddOpt方法的具体用法?C# Step.AddOpt怎么用?C# Step.AddOpt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Step
的用法示例。
在下文中一共展示了Step.AddOpt方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LongPress
/// <summary>
/// Press at the specified location in the element until the context menu appears.
/// </summary>
/// <param name="element">The target element.</param>
/// <param name=x>The x coordinate relative to the element.</param>
/// <param name=y>The y coordinate relative to the element.</param>
/// <returns>A self-reference to this <see cref="ITouchAction"/>.</returns>
public ITouchAction LongPress(double x, double y)
{
Step longPressStep = new Step("longpress");
longPressStep
.AddOpt("x", x)
.AddOpt("y", y);
this.steps.Add (longPressStep);
return this;
}
示例2: LongPress
/// <summary>
/// Press at the specified location in the element until the context menu appears.
/// </summary>
/// <param name="element">The target element.</param>
/// <param name=x>The x coordinate relative to the element.</param>
/// <param name=y>The y coordinate relative to the element.</param>
/// <returns>A self-reference to this <see cref="ITouchAction"/>.</returns>
public ITouchAction LongPress(IWebElement element, double? x = null, double? y = null)
{
Step longPressStep = new Step("longpress");
longPressStep
.AddOpt ("element", element)
.AddOpt("x", x)
.AddOpt("y", y);
this.steps.Add (longPressStep);
return this;
}
示例3: Wait
/// <summary>
/// Wait for the given duration.
/// </summary>
/// <param name="ms">The amount of time to wait in milliseconds.</param>
/// <returns>A self-reference to this <see cref="ITouchAction"/>.</returns>
public ITouchAction Wait(long? ms = null)
{
Step waitStep = new Step("wait");
waitStep
.AddOpt ("ms", ms);
this.steps.Add (waitStep);
return this;
}
示例4: Tap
/// <summary>
/// Tap at the specified location.
/// </summary>
/// <param name="x">The x coordinate relative to the element.</param>
/// <param name="y">The y coordinate relative to the element.</param>
/// <param name="count">The number of times to tap.</param>
/// <returns>A self-reference to this <see cref="ITouchAction"/>.</returns>
public ITouchAction Tap(double x, double y, long? count = null)
{
Step tapStep = new Step("tap");
tapStep
.AddOpt("x", x)
.AddOpt("y", y)
.AddOpt("count", count);
this.steps.Add (tapStep);
return this;
}
示例5: Press
/// <summary>
/// Press at the specified location.
/// </summary>
/// <param name=x>The x coordinate.</param>
/// <param name=y>The y coordinate.</param>
/// <returns>A self-reference to this <see cref="ITouchAction"/>.</returns>
public ITouchAction Press(double x, double y)
{
Step pressStep = new Step("press");
pressStep
.AddOpt("x", x)
.AddOpt("y", y);
this.steps.Add (pressStep);
return this;
}
示例6: MoveTo
/// <summary>
/// Move to the specified location.
/// </summary>
/// <param name=x>The x coordinate.</param>
/// <param name=y>The y coordinate.</param>
/// <returns>A self-reference to this <see cref="ITouchAction"/>.</returns>
public ITouchAction MoveTo(double x, double y)
{
Step moveToStep = new Step("moveTo");
moveToStep
.AddOpt("x", x)
.AddOpt("y", y);
this.steps.Add (moveToStep);
return this;
}