AppInitializer.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.IO;
  3. using System.Linq;
  4. using Xamarin.UITest;
  5. using Xamarin.UITest.Queries;
  6. namespace MyWeather.UITests
  7. {
  8. public class AppInitializer
  9. {
  10. public static IApp StartApp (Platform platform)
  11. {
  12. // TODO: If the iOS or Android app being tested is included in the solution
  13. // then open the Unit Tests window, right click Test Apps, select Add App Project
  14. // and select the app projects that should be tested.
  15. if (platform == Platform.Android) {
  16. return ConfigureApp
  17. .Android
  18. // TODO: Update this path to point to your Android app and uncomment the
  19. // code if the app is not included in the solution.
  20. .ApkFile ("../../../MyWeather/MyWeather.Droid/bin/Debug/com.devdays.myweather.apk")
  21. .StartApp ();
  22. }
  23. return ConfigureApp
  24. .iOS
  25. // TODO: Update this path to point to your iOS app and uncomment the
  26. // code if the app is not included in the solution.
  27. .AppBundle ("../../../MyWeather/MyWeather.iOS/bin/iPhoneSimulator/Debug/MyWeatheriOS.app")
  28. .StartApp ();
  29. }
  30. }
  31. }