Exemplo n.º 1
0
        public static IApp StartApp(Platform platform, AppDataMode appDataMode = (AppDataMode)0)
        {
            // TODO: If the iOS or Android app being tested is included in the solution
            // then open the Unit Tests window, right click Test Apps, select Add App Project
            // and select the app projects that should be tested.
            //
            // The iOS project should have the Xamarin.TestCloud.Agent NuGet package
            // installed. To start the Test Cloud Agent the following code should be
            // added to the FinishedLaunching method of the AppDelegate:
            //
            //    #if ENABLE_TEST_CLOUD
            //    Xamarin.Calabash.Start();
            //    #endif
            if (platform == Platform.Android)
            {
                return(ConfigureApp
                       .Android
                       .EnableLocalScreenshots()
                       // TODO: Update this path to point to your Android app and uncomment the
                       // code if the app is not included in the solution.
                       .ApkFile("../../../App1/App1.Android/bin/Debug/com.companyname.App1.apk")
                       .StartApp(appDataMode));
            }

            return(ConfigureApp
                   .iOS
                   .EnableLocalScreenshots()
                   //.DeviceIdentifier("A4EEC3C8-150E-4968-B9DD-F20534EB4599")
                   //.InstalledApp("com.flynncompanies.coaching.dev")
                   //.EnableLocalScreenshots()
                   // TODO: Update this path to point to your iOS app and uncomment the
                   // code if the app is not included in the solution.
                   //.AppBundle ("../../../Coaching.iOS/bin/iPhoneSimulator/Debug/AuthTest.app")
                   .StartApp(appDataMode));
        }
Exemplo n.º 2
0
        public static IApp StartApp(Platform platform, AppDataMode appDataMode)
        {
            if (platform == Platform.Android) {
                return ConfigureApp.Android.StartApp (appDataMode);
            }

            return ConfigureApp.iOS.StartApp (appDataMode);
        }
Exemplo n.º 3
0
        public static IApp StartApp(Platform platform, AppDataMode appDataMode)
        {
            if (platform == Platform.Android)
            {
                return(ConfigureApp.Android.StartApp(appDataMode));
            }

            return(ConfigureApp.iOS.StartApp(appDataMode));
        }
Exemplo n.º 4
0
        public static IApp StartApp(Platform platform, AppDataMode dataMode = AppDataMode.Auto)
        {
            if (platform == Platform.Android)
            {
                return(ConfigureApp
                       .Android
                       .InstalledApp("ch.tbz.schinkzeships")
                       .StartApp(dataMode));
            }

            return(ConfigureApp
                   .iOS
                   .InstalledApp("ch.tbz.SchinkZeShips")
                   .StartApp());
        }
        private static IApp StartApp(AppDataMode mode = default(AppDataMode))
        {
            if (Current.Platform == Platform.Android)
            {
                App = ConfigureApp
                    .Android
                    .ApkFile("Apps/com.refractored.myshoppe.apk")
                    .StartApp(mode);
            }
            else
            {
                App = ConfigureApp
                    .iOS
                    .AppBundleZip("Apps/MyShopiOS.zip")
                    .StartApp(mode);
            }

            return App;
        }
Exemplo n.º 6
0
        private static IApp StartApp(AppDataMode mode = default(AppDataMode))
        {
            if (Current.Platform == Platform.Android)
            {
                App = ConfigureApp
                      .Android
                      .ApkFile("Apps/com.refractored.myshoppe.apk")
                      .StartApp(mode);
            }
            else
            {
                App = ConfigureApp
                      .iOS
                      .AppBundleZip("Apps/MyShopiOS.zip")
                      .StartApp(mode);
            }

            return(App);
        }
Exemplo n.º 7
0
        private static IApp StartApp(Platform platform, AppDataMode dataMode)
        {
            if (platform == Platform.Android)
            {
                var app = ConfigureApp
                          .Android
                          .ApkFile(@"C:\Users\JDelzer\source\repos\mobile-testing-demo\TaskApp\TaskyAndroid\bin\Release\com.xamarin.samples.taskyandroid.apk")
                          .StartApp(dataMode);

                return(app);
            }
            else if (platform == Platform.iOS)
            {
                IApp app = ConfigureApp
                           .iOS
                           .StartApp(dataMode);

                return(app);
            }

            throw new NotImplementedException();
        }