断言失败.调用的目标已引发异常. < b>由以下原因引起:</b> Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException: [英] Assert.Fail failed. Exception has been thrown by the target of an invocation. <b>Caused by: </b>Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException:

查看:142
本文介绍了断言失败.调用的目标已引发异常. < b>由以下原因引起:</b> Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Assert.Fail失败.调用的目标已引发异常. < b>由以下原因引起:</b> Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException:

Assert.Fail failed. Exception has been thrown by the target of an invocation. <b>Caused by: </b>Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException:

我正在自动化一个应用程序,脚本运行了好几个月.但是最近我尝试执行脚本时,出现了以下错误.

I am automating an application and the scripts were working fine for quite few months. But some how when I tried to execute the scripts recently, I got the below error.

技术名称: 'MSAA'
姓名: 'ITEM'
ControlType: 按钮"
  --- System.Runtime.InteropServices.COMException:从对COM组件的调用返回了错误HRESULT E_FAIL.

TechnologyName:  'MSAA'
Name:  'ITEM'
ControlType:  'Button'
 ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.


我不确定是什么突然导致了问题.突然,它无法正常工作. Any1对此有所启发.

I am not sure what is causing the issue suddenly. All of sudden it is not working properly. Any1 throw some light on this.

谢谢,Suresh 

Thanks,Suresh 

推荐答案

Suresh,

Hi Suresh,

根据错误消息,请执行以下情形:

According to the error message, please do the following scenarios:

1).清洁溶液并重建以查看结果;

1). Clean the solution and rebuild it to see the results;

2).删除csproj.user文件和解决方案的suo文件以查看结果.

2). Delete the csproj.user file and solution's suo file to see the results.

3).从以下位置删除项目缓存:

3). Deleting the project Cache from the below location:

C:\ Program Files \ Microsoft Visual Studio 您的VS版本 (14个或其他) \ Common7 \ IDE \ ProjectTemplatesCache

C:\Program Files\Microsoft Visual Studio your VS version (14 or others) \Common7\IDE\ProjectTemplatesCache

C:\ Program Files(x86)\ Microsoft Visual Studio 您的VS版本 (14个或其他)\ Common7 \ IDE \ ProjectTemplatesCache

C:\Program Files(x86)\Microsoft Visual Studio your VS version (14 or others) \Common7\IDE\ProjectTemplatesCache

然后运行"devenv.exe/setup"重新构建缓存.

Then run "devenv.exe /setup" to re-build the cache.

点击开始"->"VS的开发人员命令提示符"->输入"devenv.exe/setup"

Click Start->Developer Command Prompt for VS-> type "devenv.exe /setup"

此致

奥斯卡


这篇关于断言失败.调用的目标已引发异常. &lt; b&gt;由以下原因引起:&lt;/b&gt; Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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