internal AppiumCommandExecutor(AppiumLocalService service, TimeSpan timeForTheServerResponding)
     : this(service.ServiceUrl, CreateRealExecutor(service.ServiceUrl, timeForTheServerResponding))
 {
     this.Service = service;
 }
 public static void StopLocalService()
 {
     if (LocalService != null && LocalService.IsRunning)
     {
         LocalService.Dispose();
         LocalService = null;
     }
 }
Beispiel #3
0
        public static void ClassInit(TestContext context)
        {
            // Start Appium Server
            var avdOptions = new KeyValuePair<string, string>("--avd", "Emulator-Api19-Default");
            var avdParamsOptions = new KeyValuePair<string, string>("--avd-args", "\"-scale 0.50\"");
            OptionCollector args = new OptionCollector();
            args.AddArguments(avdOptions);
            args.AddArguments(avdParamsOptions);

            service = new AppiumServiceBuilder().WithArguments(args).UsingAnyFreePort().Build();
            service.Start();
            Assert.IsTrue(service.IsRunning);

            // Start Appium Client
            DesiredCapabilities capabilities = new DesiredCapabilities();
            capabilities.SetCapability("deviceName", "Android Emulator");
            capabilities.SetCapability("platformName", "Android");
            capabilities.SetCapability("app", "C:\\Git\\qa-academy\\2015\\MobileTesting\\testapp\\android-rottentomatoes-demo-debug.apk");
            driver = new AndroidDriver<AndroidElement>(service.ServiceUrl, capabilities);
        }
 internal AppiumCommandExecutor(Uri url, TimeSpan timeForTheServerResponding)
     : this(url, CreateRealExecutor(url, timeForTheServerResponding))
 {
     this.Service = null;
 }
Beispiel #5
0
 internal AppiumCommandExecutor(AppiumLocalService service, TimeSpan timeForTheServerResponding)
     : this(service.ServiceUrl, CreateRealExecutor(service.ServiceUrl, timeForTheServerResponding))
 {
     this.Service = service;
 }
Beispiel #6
0
 internal AppiumCommandExecutor(Uri url, TimeSpan timeForTheServerResponding)
     : this(url, CreateRealExecutor(url, timeForTheServerResponding))
 {
     this.Service = null;
 }