我需要在 iOS 下测试我的 Xamarin 应用程序的 UI。我使用 Xamarin.UITest |为此,Visual Studio (windows 10) 上的 CrossPlatform
。昨天我找到了 Android 的解决方案,现在需要它用于 iOS 模拟器。我的 PC 连接到 mac,我可以在模拟器的本地机器上启动应用程序。但是我无法开始 UI 测试:
public class AppInitializer
{
public static IApp StartApp(Platform platform)
{
if (platform == Platform.Android)
{
return ConfigureApp
.Android
.ApkFile(@"D:\..MyApp.apk")
.StartApp();
}
return ConfigureApp
.iOS
.AppBundle(@"D:\..MyApp.iOS")
.StartApp();
}
}
Message: SetUp : System.Exception : iOS tests are not supported on Windows.
iOS 模拟器工作正常,为什么我无法启动 UI.Test? 谢谢!
最佳答案
目前无法在 Windows 上运行 UITest for iOS 应用程序,您需要在 macOS 机器上运行。
来源:https://developer.xamarin.com/guides/testcloud/uitest/working-with/testing-on-devices/ios/
关于c# - Windows 上的 Xamarin UI 测试 iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49571658/