我使用CodedUI记录产品的安装,并试图在visual studio中重放录制内容。我遇到了一些奇怪的问题,我不知道如何解决这些问题。
Message: Test method CodedUITestProject5.CodedUITest1.CodedUITestMethod1 threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToLaunchApplicationException: "The application cannot be started because it cannot be found in the specified location, or the user does not have sufficient permissions to start the application." File: C:\Users\Sakamoto\AppData\Local\Temp\{CF4F5CDB-4597-4C70-BBFD-2687BB031067}\.cr\Setup.exe. Alternative file name: %TMP%\{CF4F5CDB-4597-4C70-BBFD-2687BB031067}\.cr\Setup.exe
有趣的是设置文件位于我的桌面上,而这就是录制内容的发布位置。查看UIMap.Designer.cs,它必须纠正“变量声明”部分下记录方法中列出的路径。
我也是以管理员身份运行Visual Studio 2017。
更改UIMap.Designer.cs文件以使所有路径指向桌面上的文件,我收到以下错误:
Message: Test method CodedUITestProject5.CodedUITest1.CodedUITestMethod1 threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToLaunchApplicationException: "The application cannot be started. This could be due to one of the following reasons:
1) Another instance of the application is already running and only one instance can be running at a time.
2) The application started another process and has now stopped. You may need to launch the process directly.
3) You do not have sufficient privileges for this application." File: C:\Users\Sakamoto\Desktop\Setup.exe.
有人可以帮助我自动运行设置过程吗?