当前位置: 首页>>代码示例>>C#>>正文


C# UITestControl.WaitForControlReady方法代码示例

本文整理汇总了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();
 }
开发者ID:rangaabyeti,项目名称:HoneywellFirst,代码行数:11,代码来源:xBrowser.cs

示例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);
 }
开发者ID:k3foru,项目名称:WinAppTestingFramework,代码行数:30,代码来源:Actions.cs

示例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);
 }
开发者ID:k3foru,项目名称:WinAppTestingFramework,代码行数:14,代码来源:Actions.cs

示例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(...)";
     }
 }
开发者ID:herno,项目名称:CodedUITestProject,代码行数:13,代码来源:MainWindow.cs


注:本文中的UITestControl.WaitForControlReady方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。