Example #1
0
        public void OneTimeSetUpBase()
        {
            this.testDb           = new TestDb();
            this.dbContext        = testDb.CreateDbContext();
            this.testEventuresApp = new TestEventuresApp <Startup>(testDb, ApiPath);
            this.baseUrl          = this.testEventuresApp.ServerUri;

            // Initialize Appium Local Service to start the Appium server automatically
            appiumLocalService = new AppiumServiceBuilder().UsingAnyFreePort().Build();
            appiumLocalService.Start();

            var appiumOptions = new AppiumOptions()
            {
                PlatformName = "Windows"
            };
            var fullPathName = Path.GetFullPath(AppPath);

            appiumOptions.AddAdditionalCapability("app", fullPathName);

            // Initialize the Windows driver with Appium local service and options
            driver = new WindowsDriver <WindowsElement>(
                appiumLocalService, appiumOptions);

            // Set an implicit wait for the UI interaction
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            // Set an explicit wait for the UI interaction
            wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));
        }
Example #2
0
 public void OneTimeSetUpBase()
 {
     this.testDb           = new TestDb();
     this.dbContext        = testDb.CreateDbContext();
     this.testEventuresApi = new TestEventuresApp <Startup>(
         testDb, "../../../../Eventures.WebAPI");
     this.httpClient = new HttpClient()
     {
         BaseAddress = new Uri(this.testEventuresApi.ServerUri)
     };
 }
Example #3
0
 public void OneTimeSetUpBase()
 {
     // Instantiate the testing db with a db context
     this.testDb    = new TestDb();
     this.dbContext = testDb.CreateDbContext();
 }