编码的UI测试生成器无法为已记录的操作生成代码 [英] Coded UI Test Builder fails to generate code for recorded action

查看:147
本文介绍了编码的UI测试生成器无法为已记录的操作生成代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过Visual Studio 2015 Enterprise在Windows 10上运行的IE中记录最简单的编码UI动作。问题是最近我开始获取 Value不能为null。参数名称:每次我单击添加并生成按钮时都会出现键错误。

I try to record the simplest Coded UI action in IE running on Windows 10 from my Visual Studio 2015 Enterprise. The problem is that recently I started to get Value cannot be null. Parameter name: key error each time I click Add and Generate button.

< a href = https://i.stack.imgur.com/TCSGf.png rel = nofollow noreferrer>

每当我将鼠标悬停在IE网页上的链接时,我都会收到访问被拒绝错误。我相信这些问题可能是相关的。

Also each time I hover the link on IE web page I get Access is denied error. I believe these problems could be related.

另一个问题是,由于无法在网页上选择任何Web控件,因此无法生成任何断言。将编码UI测试生成器的十字准线放置在文本输入的中间后,整个文档被突出显示。

One more issue is that I can not generate any assertions since am unable to select any web control on web page. After I placed Coded UI Test Builder's crosshair in the middle of text input the whole document was highlighted.

要解决此问题,建议检查项目引用。因此,我包括了所有可能找到的与编码UI参考相关的信息。这是项目中包含的参考的完整列表:

To fix the issue I was advised to check project references. So I included any possibly related to Coded UI reference I could find. This is the full list of references included in the project:

除了我已经尝试过:

1.重新启动VS

2.重新启动PC

3.以管理员身份运行VS和IE (与Access is Denied问题有关)。

4.向项目添加了新的UIMap文件。我尝试在其中记录操作。

5.正如其中一项注释中所建议的那样这里我检查了浏览器缩放级别并将其设置为100%。

6.使用新的CodedUI测试项目启动新的解决方案。

7.从Visual Studio开发人员命令提示符处启动Coded UI Test Builder。通过在命令行中执行 codedUITestBuilder.exe / standalone 独立的应用程序。

8.尝试针对Windows资源管理器记录编码的UI测试。结果,我有很多 //访问被拒绝。注释行。

9.以安全模式启动VS。测试生成器没有失败,但结果是我得到 //由于未访问应用程序,因此未记录上一个操作。并且未记录任何实际步骤。

10.以安全模式以管理员身份运行Visual Studio ,因此没有外部插件会影响VS。

11.我已经重新安装了Visual Studio。

12. 已启用ui组件跟踪,但在记录过程中未生成任何实际输出。 Visual Studio的 Testing 选项卡下的输出窗口保持空白。

13.检查 CodedUITestBuilder.exe.config 。注释了以下配置,因此我未对其进行注释:

Except that I've already tried to:
1. Restart VS
2. Restart PC
3. Run VS and IE as administrator (related to Access is Denied issue)
4. Added new UIMap file to the project. I tried to record actions there.
5. As it was suggested in one of the comments here I checked browser zoom level and set it to 100%.
6. Started new solution with new CodedUI test project.
7. Started Coded UI Test Builder from Visual Studio developer command prompt as a standalone application by executing codedUITestBuilder.exe /standalone in command line.
8. Tried to record Coded UI test against Windows Explorer. In result I've got a lot of // Access is denied. comment lines.
9. Started VS in a safe mode. Test builder does not fail but in result I get // The last action was not recorded because access to the application was denied. and no actual steps were recorded.
10. Ran Visual Studio as administrator in a safe mode so no external plugins are influencing VS.
11. I've reinstalled Visual Studio. It didn't help.
12. Enabled tracing for ui components but no actual output is generated during recording. The output window of Visual Studio under Testing tab remains empty.
13. Checked the CodedUITestBuilder.exe.config. The following configuration was commented so I uncommented it:

 <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>

14。正如在一项建议中所建议的那样,注释在此我添加了%ProgramFiles%\Internet Explorer\iexplore。 exe 作为 ExcludeProcess 的值之一,然后是<$ c $中的 IncludeProcess 部分的值之一c> CodedUITestBuilder.exe.config 。问题是,现在我实际上看不到访问被拒绝错误,但仍然无法记录任何步骤或在html控件上移动十字准线

14. As it is suggested in one the comments here I added %ProgramFiles%\Internet Explorer\iexplore.exe as one of the values of ExcludeProcess and then IncludeProcess sections in CodedUITestBuilder.exe.config. The thing is that now I actually do not see Access is Denied error, but still I'm not able to record any steps or move crosshair on html control.

网络上的大多数解决方案是重新安装Visual Studio,如果无济于事,请重新安装Windows。这对我来说是无法接受的解决方案。 如何在不重新安装Visual Studio和/或Windows的情况下解决此问题?

Most of the solutions in the web are to reinstall Visual Studio and if it doesn't help - reinstall Windows. This is unacceptable solution for me. How can I solve the issue without reinstalling my Visual Studio and/or Windows?

推荐答案

我尝试过列表中的所有项目,然后执行以下操作:

I tried all the items on your list and then the following got it to work:

(右键单击):

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CodedUITestBuilder.exe" 

(检查):

"Properties\Compatability\Change settings for all users\Run the program in compatability mode for:" 

(选择):

"Windows 7"

也可能是这样的:

(检查):

"Properties\Compatability\Change settings for all users\Run this program as an administrator"

我也禁用了恶意软件字节,但不认为这会影响它。我不确定这是否是两者的组合,但它在 Windows 7兼容性之后开始工作。这些是您至少可以添加到列表中的更多项目。

I also disabled Malware Bytes but don't think this affected it. I'm not exactly sure whether it was a combination of these but it started working after "Windows 7 Compatability". These are more items you can add to your list at least.

Steve

这篇关于编码的UI测试生成器无法为已记录的操作生成代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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