我正在Xamarin上编写UITests。我正在尝试启动 Repl 窗口,但它没有启动。
我的代码:
using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.Android;
using Xamarin.UITest.Queries;
namespace MurakamiKiev.UITests
{
[TestFixture]
public class Tests
{
AndroidApp app;
[SetUp]
public void BeforeEachTest ()
{
app = ConfigureApp.Android.StartApp();
}
[Test]
public void ClickingButtonTwiceShouldChangeItsLabel ()
{
app.Repl();
}
}
}
我的代码有什么问题?感谢您的帮助。
我遇到了同样的问题,问题是那个应用程序。Repl();已经在后台运行,从上一个会话开始。(调试时,如果终止调试器,它不会自动关闭)
我得到的错误是:
System.Exception: 'Error while performing Repl()
内部异常
IOException: The process cannot access the file 'C:UsersdanielAppDataLocalTempuitestreplICSharpCode.NRefactory.CSharp.dll because it is being used by another process.
所以你只需要关闭应用程序。Repl();在后台运行的命令提示符
该代码没有任何问题。我以前见过这种情况,但现在不记得确切的分辨率。可能一直在使用 NUnit 版本>= 3。您能看到使用 NUnit 版本 2.6.3 是否仍然遇到相同的问题吗?