Exemple #1
0
        public void OverrideDriverFuncRespected()
        {
            var driver = AppiumDriverFactory.GetDefaultMobileDriver();

            this.TestObject.OverrideWebDriver(() => driver);

            Assert.AreEqual(driver, this.AppiumDriver);
        }
Exemple #2
0
        public void SeparateLazyElementInteractions()
        {
            MobileDriverManager newDriver = new MobileDriverManager(() => AppiumDriverFactory.GetDefaultMobileDriver(), this.TestObject);

            newDriver.GetMobileDriver().Navigate().GoToUrl("https://magenicautomation.azurewebsites.net/");
            this.ManagerStore.Add("test", newDriver);

            this.TestObject.AppiumDriver.Navigate().GoToUrl("https://magenicautomation.azurewebsites.net/Automation");

            LazyMobileElement topNew     = new LazyMobileElement(this.TestObject, newDriver.GetMobileDriver(), By.CssSelector("*"));
            LazyMobileElement topDefault = new LazyMobileElement(this.TestObject, By.CssSelector("*"));

            Assert.AreNotEqual(topNew.Text, topDefault.Text);
        }
Exemple #3
0
        public void GetAndCloseDriverTest()
        {
            AppiumDriver <IWebElement> driver = AppiumDriverFactory.GetDefaultMobileDriver();

            try
            {
                Assert.IsNotNull(driver);
            }
            finally
            {
                driver.Quit();
                driver.Dispose();
            }
        }
Exemple #4
0
        public void MobileDeviceTest()
        {
            AppiumDriver driver = AppiumDriverFactory.GetDefaultMobileDriver();

            try
            {
                Assert.IsNotNull(driver);
            }
            finally
            {
                driver.Quit();
                driver.Dispose();
            }
        }
Exemple #5
0
        public void GetWaitDriverTest()
        {
            AppiumDriver <IWebElement> driver = AppiumDriverFactory.GetDefaultMobileDriver();
            WebDriverWait wait = AppiumUtilities.GetDefaultWaitDriver(driver);

            try
            {
                Assert.IsNotNull(wait);
            }
            finally
            {
                driver.Quit();
                driver.Dispose();
            }
        }
Exemple #6
0
        public void MobileDeviceTest()
        {
            #region MobileDevice
            AppiumDriver <IWebElement> driver = AppiumDriverFactory.GetDefaultMobileDriver();
            #endregion

            try
            {
                Assert.IsNotNull(driver);
            }
            finally
            {
                driver.Quit();
                driver.Dispose();
            }
        }
        public void OverrideDriverRespected()
        {
            var driver = AppiumDriverFactory.GetDefaultMobileDriver();

            this.TestObject.OverrideAppiumDriver(driver);
        }