xamarin.uitest

How to Add Calabash to React Native iOS for Xamarin.UITest

谁说我不能喝 提交于 2020-01-02 12:19:38
问题 How can I add the Calabash Framework to an iOS app built in React Native? We are moving the codebase of our iOS app from Swift to React Native, and I have an existing suite of UITests built in C# using Xamarin.UITest. I'd like to continue using my Xamarin.UITest suite for the React Native iOS app, but I know that Xamarin.UITest requires the Calabash framework to be linked in the app's source code. Xamarin has documentation on how to link Calabash for an iOS app built in Xcode, but I cannot

How to Add Calabash to React Native iOS for Xamarin.UITest

馋奶兔 提交于 2020-01-02 12:18:58
问题 How can I add the Calabash Framework to an iOS app built in React Native? We are moving the codebase of our iOS app from Swift to React Native, and I have an existing suite of UITests built in C# using Xamarin.UITest. I'd like to continue using my Xamarin.UITest suite for the React Native iOS app, but I know that Xamarin.UITest requires the Calabash framework to be linked in the app's source code. Xamarin has documentation on how to link Calabash for an iOS app built in Xcode, but I cannot

Facing “Stalled error ” on Xamarin test cloud when Xamarin.ios Uitest ran from Xamarin Studio

廉价感情. 提交于 2019-12-25 08:30:06
问题 I am facing "Stalled error" when running UITest on Xamarin test cloud from mac machine - Xamarin studio. UITest is written for Xamarin.ios application, which is just having code (the default code) AppLaunches test and code is app.Screenshot("First screen"). My BeforeEachTest looks like as below app = Configureapp.ios.PreferIdeSetting().StartApp(); Inside xamarin studio, unit test window, I have linked the ios app to the UITest project. My project is in configuration debug|iPhone. I have

Xamarin.UITest: How to Retrieve All Elements in List

女生的网名这么多〃 提交于 2019-12-22 14:02:23
问题 I have a list of 500 elements and when I use app.Query on the page, Xamarin.UITest gives me only 6 elements as only 6 elements are visible in UI. How can I retrieve all 500 elements from the list inside of my UITest? 回答1: As described above, the expected behavior of app.Query will only return the results of all visible controls on the page. Thus, if a control is not visible, app.Query will not return it. The way to retrieve all of the data in a list is to use a Backdoor Method. Xamarin has

Enable/Disable wifi using Xamarin UiTest

岁酱吖の 提交于 2019-12-14 01:50:56
问题 I try to enable/disable wifi programmatically within my Xamarin Ui Test. I already found this: Android: How to Enable/Disable Wifi or Internet Connection Programmatically. But it seems not to work within the UiTest. I also tried something like this: Context appContext = Android.App.Application.Context; var wifiManager = (WifiManager)appContext.GetSystemService(Context.WifiService); bool status = false; wifiManager.SetWifiEnabled(status); The first line (Android.App.Application.Context) throws

Xamarin.UITest: How To Verify Placeholder/Hint Text

北战南征 提交于 2019-12-12 18:28:06
问题 I am writing a Xamarin.UITest for a cross-platform Xamarin.iOS and Xamarin.Android app. In my Xamarin.UITest, how do I verify the following properties: On Xamarin.Android, how can I verify the Hint property for an EditText ? On Xamarin.iOS, how can I verify the Placeholder property for a UITextField ? 回答1: Sample Code string GetPlaceholderText(string entryAutomationId) { if (app is AndroidApp) { return app.Query(x => x.Marked(entryAutomationId)?.Invoke("getHint"))?.FirstOrDefault()?.ToString(

how to specify the platform (android or ios) test with nunit console

自作多情 提交于 2019-12-11 14:05:01
问题 I have a xamarin ui test multiplateform project, I would like to know if I launch my test via the console it is possible to launch only ios or android tests. For if it launches the two ... my current command line is : mono /Users/Shared/opt/NUnit/nunit3-console.exe /Users/Shared/Jenkins/Home/workspace/build_project/UITest/bin/Debug/UITest.dll Thank's for your help 回答1: I find the solution, I need to add --test="UITest.Tests(my_platform)" to select either iOS or Android! 来源: https:/

AppInitializer always launches android for cross platform tests

时间秒杀一切 提交于 2019-12-11 05:16:06
问题 I'm writing a UI Test that is supposed to be cross platform between Android and IOS. When I run my App Initializer on a Mac, the "platform" Xamarin object always resolves as android (confirmed when running the tests in debug mode) even though I have an iOS simulator open and an iOS device plugged in with no Andorid simulators or devices connected. public static IApp StartApp(Platform platform) { if (platform == Platform.Android) { return ConfigureApp .Android .ApkFile("../../Binaries/Android

Xamarin.UITest DeviceAgentException: Failed to install DeviceAgent

混江龙づ霸主 提交于 2019-12-09 13:29:26
问题 How do I solve this error that occurs when running Xamarin.UITest on an iOS Device? It happens on both the iOS Simulator and a physical iOS device. SetUp : Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to install DeviceAgent: ApplicationName='/var/folders/5m/3712cp7j2k928k6z3fgszfyw0000gp/T/xdb/DeviceAgent.iOS.Dependencies/93c12f73043a2d14eea9d417ab080eb4/bin/iOSDeviceManager', CommandLine='install -d fcbb5006c892e39f1f675a3f6804ce3688c3b8d1 -a /var/folders/5m

Is there a method to close and Reconnect an app in Xamarin Android UITest?

走远了吗. 提交于 2019-12-08 13:11:51
问题 Is there any way to close and reconnect to my app in Xamarin UITest? In my test case I want close and reconnect my Android app. 回答1: Depending upon what you mean by "close", but here are a couple of ways... In the MainActivty of your Xamarin.Forms Android app, add some UITest backdoors: [Export("HardExitBackdoor")] public void HardExitBackdoor() { Log.Info("UITest", "Finish"); Finish(); } [Export("BackgroundBackdoor")] public void BackgroundBackdoor() { Log.Info("UITest", "MoveTaskToBack");