本文整理汇总了C#中UITestControl.WaitForControlReady方法的典型用法代码示例。如果您正苦于以下问题:C# UITestControl.WaitForControlReady方法的具体用法?C# UITestControl.WaitForControlReady怎么用?C# UITestControl.WaitForControlReady使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UITestControl
的用法示例。
在下文中一共展示了UITestControl.WaitForControlReady方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WaitForControl
/// <summary>
/// Waits for control to exist, be enabled, and ready
/// </summary>
/// <param name="control">Target UITestControl</param>
public static void WaitForControl(UITestControl control)
{
control.Find();
control.WaitForControlExist();
control.WaitForControlEnabled();
control.WaitForControlReady();
}
示例2: MouseClickOnCoordinates
//public static void MouseClickOnCoordinates(UITestControl control)
//{
// control.WaitForControlReady();
// control.SetFocus();
// Point screenCoordinate = new Point();
// // ISSUE: explicit reference operation
// // ISSUE: variable of a reference type
// Point& local = @screenCoordinate;
// Rectangle boundingRectangle = control.BoundingRectangle;
// int num1 = boundingRectangle.Width / 2;
// boundingRectangle = control.BoundingRectangle;
// int x1 = boundingRectangle.X;
// int x2 = num1 + x1;
// boundingRectangle = control.BoundingRectangle;
// int num2 = boundingRectangle.Height / 2;
// boundingRectangle = control.BoundingRectangle;
// int y1 = boundingRectangle.Y;
// int y2 = num2 + y1;
// // ISSUE: explicit reference operation
// ^local = new Point(x2, y2);
// Mouse.Click(screenCoordinate);
//}
public static void MouseClickOnCoordinates(UITestControl control)
{
control.WaitForControlReady();
control.SetFocus();
var clickPoints = new Point(control.BoundingRectangle.Width / 2 + control.BoundingRectangle.X,
control.BoundingRectangle.Height / 2 + control.BoundingRectangle.Y);
Mouse.Click(clickPoints);
}
示例3: SetText
public static void SetText(UITestControl control, string text)
{
control.WaitForControlReady();
control.SetFocus();
MouseClickOnCoordinates(control);
if (!control.GetProperty("Value").Equals(null))
{
SendKeys.SendWait("^A");
SendKeys.SendWait("{DELETE}");
}
SendKeys.SendWait("{HOME}");
Playback.Wait(1000);
SendKeys.SendWait(text);
}
示例4: WaitForEnable
private void WaitForEnable(UITestControl control)
{
try
{
int waitTime = 1000 * 60 * 2;
control.WaitForControlExist(waitTime);
control.WaitForControlReady(waitTime);
}
catch (UITestControlNotFoundException)
{
control.SearchProperties[WinTabPage.PropertyNames.Name] = "Campaigns(...)";
}
}