Пример #1
0
		public void SetUp()
		{
			if (TestEnvironment.Platform.Equals(TestPlatform.TestCloudiOS))
			{
                // Setup the screenQueries
                _screenQueries = new iOSScreenQueries();

                _isIos = true;

                // configure the app
				_app = ConfigureApp
					.iOS
					.StartApp();
			}
			else if (TestEnvironment.Platform.Equals(TestPlatform.TestCloudAndroid))
			{
                // Setup the screenQueries
                _screenQueries = new AndroidScreenQueries();

                // configure the app
                _app = ConfigureApp
                    .Android
                    .StartApp();
			}
			else if (TestEnvironment.Platform.Equals(TestPlatform.Local))
			{
				// NOTE Enable or disable the lines depending on what platform you want ot test
//				SetupForiOSLocalTesting ();				
                SetupForAndroidLocalTesting();
			}
			else
			{
				throw new NotImplementedException(String.Format("I don't know this platform {0}", TestEnvironment.Platform));
			}
		}
        public void SetUp()
        {
            switch (TestEnvironment.Platform)
            {
                case TestPlatform.TestCloudiOS:
                    _queries = new iOSQueries();
                    _app = ConfigureApp.iOS.StartApp();
                    break;

                case TestPlatform.TestCloudAndroid:
                    _queries = new AndroidQueries();
                    _app = ConfigureApp.Android.StartApp();
                    break;

                case TestPlatform.Local:
#if __IOS__
                    throw new NotImplementedException("Try implementing this functionality");

#elif __ANDROID__
                    _app = ConfigureApp
                              .Android
                              .ApkFile(_config.PathToAPK)
                              .ApiKey(_config.API_KEY)
                              .StartApp();
                  _queries = new AndroidQueries();
#elif __IOS_DEVICE__
                    throw new NotImplementedException("Try implementing this functionality");
#endif
                    break;
                default:
                    throw new NotImplementedException($"I don't know this platform {TestEnvironment.Platform}");
            }
        }
        public void SetUp()
        {
            switch (TestEnvironment.Platform)
            {
            case TestPlatform.TestCloudiOS:
                _queries = new iOSQueries();
                _app     = ConfigureApp.iOS.StartApp();
                break;

            case TestPlatform.TestCloudAndroid:
                _queries = new AndroidQueries();
                _app     = ConfigureApp.Android.StartApp();
                break;

            case TestPlatform.Local:
#if __IOS__
                throw new NotImplementedException("Try implementing this functionality");
#elif __ANDROID__
                _app = ConfigureApp
                       .Android
                       .ApkFile(_config.PathToAPK)
                       .ApiKey(_config.API_KEY)
                       .StartApp();
                _queries = new AndroidQueries();
#elif __IOS_DEVICE__
                throw new NotImplementedException("Try implementing this functionality");
#endif
                break;

            default:
                throw new NotImplementedException($"I don't know this platform {TestEnvironment.Platform}");
            }
        }
Пример #4
0
        public void SetUp()
        {
            if (TestEnvironment.Platform.Equals(TestPlatform.TestCloudiOS))
            {
                _app = ConfigureApp
                       .iOS
                       .StartApp();
                _queries = new iOSQueries();
            }
            else if (TestEnvironment.Platform.Equals(TestPlatform.TestCloudAndroid))
            {
                _queries = new AndroidQueries();
                _app     = ConfigureApp
                           .Android
                           .StartApp();
            }
            else if (TestEnvironment.Platform.Equals(TestPlatform.Local))
            {
//                _app = ConfigureApp
//                                                    .iOS
//                                                    .AppBundle(PathToIPA)
//                                                    .StartApp();
//                _queries = new iOSQueries();

                _app = ConfigureApp
                       .Android
                       .ApkFile(PathToAPK)
                       .StartApp();
                _queries = new AndroidQueries();
            }
            else
            {
                throw new NotImplementedException(String.Format("I don't know this platform {0}", TestEnvironment.Platform));
            }
        }
Пример #5
0
        /// <summary>
        /// This will initialize IApp to the iOS application.
        /// </summary>
        void ConfigureiOSApp()
        {
            _queries = new iOSQueries();

            _app = ConfigureApp.iOS
                   .EnableLocalScreenshots()
                   .AppBundle(PathToIPA)
                   .StartApp();
        }
Пример #6
0
        /// <summary>
        /// This will initialize the IApp to the Android application.
        /// </summary>
        void ConfigureAndroidApp()
        {
            CheckAndroidHomeEnvironmentVariable();
            _queries = new AndroidQueries();

            _app = ConfigureApp.Android
                   .ApkFile(PathToAPK)
                   .EnableLocalScreenshots()
                   .StartApp();
        }
 public void BeforeEachTest()
 {
     app = AppInitializer.StartApp(platform);
     if(platform == Platform.Android)
     {
         screenQueries = new AndroidQueries();
     } else
     {
         screenQueries = new iOSQueries();
     }
 }
        public void SetUp()
        {
            if (TestEnvironment.Platform.Equals(TestPlatform.TestCloudiOS))
            {
                // set the queries for platform
                _queries = new iOSScreenQueries();

                // configure the app
                _app = ConfigureApp
                    .iOS
                    .StartApp();
            }
            else if (TestEnvironment.Platform.Equals(TestPlatform.TestCloudAndroid))
            {
                // set the queries for platform
                _queries = new AndroidScreenQueries();

                // configure the app
                _app = ConfigureApp
                    .Android
                    .StartApp();
            }
            else if (TestEnvironment.Platform.Equals(TestPlatform.Local))
            {
                CheckAndroidHomeEnvironmentVariable();

                // NOTE Enable or disable the lines depending on what platform you want ot test

//                 set the queries for platform
                 _queries = new iOSScreenQueries();

//                 configure the ios app
                _app = ConfigureApp.iOS
                    .ApiKey("YOUR_API_KEY")
                    .AppBundle(PathToIPA)
                    .StartApp();

                // set the queries for platform
//                _queries = new AndroidScreenQueries();
//
//                // configure the android app
//                _app = ConfigureApp
//                    .Android
//                    .ApkFile(PathToAPK)
                //    .ApiKey("YOUR_API_KEY")
//                    .StartApp();
            }
            else
            {
                throw new NotImplementedException(String.Format("I don't know this platform {0}", TestEnvironment.Platform));
            }
        }
Пример #9
0
        public void SetUp()
        {
            if (TestEnvironment.Platform.Equals(TestPlatform.TestCloudiOS))
            {
                // set the queries for platform
                _queries = new iOSScreenQueries();

                // configure the app
                _app = ConfigureApp
                       .iOS
                       .StartApp();
            }
            else if (TestEnvironment.Platform.Equals(TestPlatform.TestCloudAndroid))
            {
                // set the queries for platform
                _queries = new AndroidScreenQueries();

                // configure the app
                _app = ConfigureApp
                       .Android
                       .StartApp();
            }
            else if (TestEnvironment.Platform.Equals(TestPlatform.Local))
            {
                CheckAndroidHomeEnvironmentVariable();

                // NOTE Enable or disable the lines depending on what platform you want ot test

//                 set the queries for platform
                _queries = new iOSScreenQueries();

//                 configure the ios app
                _app = ConfigureApp.iOS
                       .ApiKey("YOUR_API_KEY")
                       .AppBundle(PathToIPA)
                       .StartApp();

                // set the queries for platform
//                _queries = new AndroidScreenQueries();
//
//                // configure the android app
//                _app = ConfigureApp
//                    .Android
//                    .ApkFile(PathToAPK)
                //    .ApiKey("YOUR_API_KEY")
//                    .StartApp();
            }
            else
            {
                throw new NotImplementedException(String.Format("I don't know this platform {0}", TestEnvironment.Platform));
            }
        }
Пример #10
0
        void ConfigureTest(Platform platform)
        {
            switch (platform)
            {
            case Platform.Android:
                _queries = new AndroidQueries();
                ConfigureAndroidApp();
                break;

            case Platform.iOS:
                _queries = new iOSQueries();
                ConfigureiOSApp();
                break;
            }
        }
Пример #11
0
		private void SetupForiOSLocalTesting()
		{
            _isIos = true;

            // Setup the screenQueries
            _screenQueries = new iOSScreenQueries();
            
			// NOTE - device identifier is different on every machine so need to run this
			// on the command line "xcrun instruments -s devices" to get a list of devices

			// configure the ios app
			//				_app = ConfigureApp.iOS
			//					.ApiKey("009518f1f4759a83d3a34b3bfe921438")
			//					.DeviceIdentifier ("8fca3b019aea68dec6b5e2bfedad2298c5f8af3a") // marks ipod
			//					.InstalledApp (PathToIPA)
			//					.StartApp ();

			_app = ConfigureApp.iOS
				.ApiKey(API_KEY)
				.AppBundle(PathToIPA)
				.StartApp();


		}
Пример #12
0
        private void SetupForAndroidLocalTesting(){
            // Setup the screenQueries
            _screenQueries = new AndroidScreenQueries();

            // configure the android appuitest 
            _app = ConfigureApp.Android
                .ApiKey(API_KEY)
                .ApkFile(PathToAPK)
                .StartApp();
        }