我正在创建CodedUI测试,但在文本框的位置出现错误 [英] I am creating CodedUI Test but I am getting error's on where textbox

查看:52
本文介绍了我正在创建CodedUI测试,但在文本框的位置出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

    • 我已经创建了一个带有编码UI测试的项目.但是 i 出现以下错误:

      I have created a project with Coded UI Test. But i get the following errors:

      Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException 
      HResult = 0xF004F000
      接收:无法找到控制
      消息  = Microsoft.VisualStudio.TestTools.UITesting

      Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException 
      HResult=0xF004F000
      ception: Unable to find the top level element of the control
      sourse  = Microsoft.VisualStudio.TestTools.UITesting

      UITestControlNotFoundException:回放未能找到具有给定搜索属性的控件.

      UITestControlNotFoundException: The playback failed to find the control with the given search properties. 

      在此部分代码中:

      #region变量声明
      WinEdit uITxtExpressionEdit = this.UICalculatorWindow.UITxtExpressionWindow.UITxtExpressionEdit;
      WinButton uIEvaluateButton = this.UICalculatorWindow.UIEvaluateWindow.UIEvaluateButton;
      WinButtonuIЗа​​крытьButton=this.UICalculatorWindow.UICalculatorTitleBar.UIЗакрытьButton;
      #endregion

      #region Variable Declarations
      WinEdit uITxtExpressionEdit = this.UICalculatorWindow.UITxtExpressionWindow.UITxtExpressionEdit;
      WinButton uIEvaluateButton = this.UICalculatorWindow.UIEvaluateWindow.UIEvaluateButton;
      WinButton uIЗакрытьButton = this.UICalculatorWindow.UICalculatorTitleBar.UIЗакрытьButton;
      #endregion

      //< span style ="margin:0px; padding:0px; border:0px; outline:0px; font-size:13.008px; vertical-align:baseline; background:transparent"> 的类型" 2 + 3-4英寸在"txtExpression"中题词
      uITxtExpressionEdit.Text = this.RecordedMethod1Params.UITxtExpressionEditText; //< ----

      // Type of  "2 + 3-4" in the "txtExpression" inscription
      uITxtExpressionEdit.Text = this.RecordedMethod1Params.UITxtExpressionEditText; //<----

      如何解决?谢谢!

      推荐答案



      这是Visual C#论坛.由于您的问题与测试有关,因此我将您的话题移至测试"论坛以获取快速响应.
      Hi,

      This is Visual C# forum. As your issue is related to Test I am moving your thread to Test forum for getting quick response.


      这篇关于我正在创建CodedUI测试,但在文本框的位置出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆