Exemplo n.º 1
0
        public void SeparateLazyElementInteractions()
        {
            SeleniumDriverManager newDriver = new SeleniumDriverManager(() => WebDriverFactory.GetBrowserWithDefaultConfiguration(BrowserType.HeadlessChrome), this.TestObject);

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

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

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

            Assert.AreNotEqual(topNew.Text, topDefault.Text);
        }
Exemplo n.º 2
0
        public void SeparateInteractions()
        {
            SeleniumDriverManager newDriver = new SeleniumDriverManager(() => WebDriverFactory.GetBrowserWithDefaultConfiguration(BrowserType.HeadlessChrome), this.TestObject);
            newDriver.GetWebDriver().Navigate().GoToUrl("https://magenicautomation.azurewebsites.net/");

            this.ManagerStore.Add("test", newDriver);

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

            Assert.AreNotEqual(this.TestObject.WebDriver.Url, ((SeleniumDriverManager)this.ManagerStore["test"]).GetWebDriver().Url);
        }
Exemplo n.º 3
0
        public void SeparateInteractions()
        {
            SeleniumDriverManager newDriver = new SeleniumDriverManager(() => WebDriverFactory.GetBrowserWithDefaultConfiguration(BrowserType.HeadlessChrome), this.TestObject);

            newDriver.GetWebDriver().Navigate().GoToUrl(SeleniumConfig.GetWebSiteBase());

            this.ManagerStore.Add("test", newDriver);

            this.TestObject.WebDriver.Navigate().GoToUrl(SeleniumConfig.GetWebSiteBase() + "/Automation");

            Assert.AreNotEqual(this.TestObject.WebDriver.Url, this.ManagerStore.GetManager <SeleniumDriverManager>("test").GetWebDriver().Url);
        }