public void CanUseMultiple()
        {
            SeleniumDriverManager newDriver = new SeleniumDriverManager(() => WebDriverFactory.GetBrowserWithDefaultConfiguration(BrowserType.HeadlessChrome), this.TestObject);
            this.ManagerStore.Add("test", newDriver);

            Assert.AreNotEqual(this.TestObject.WebDriver.GetLowLevelDriver(), ((SeleniumDriverManager)this.ManagerStore["test"]).GetWebDriver().GetLowLevelDriver());
        }
        public void Intialized()
        {
            // Do something so we initialize the web driver
            this.WebDriver.Manage().Window.Maximize();

            SeleniumDriverManager driverDriver = this.ManagerStore[typeof(SeleniumDriverManager).FullName] as SeleniumDriverManager;
            Assert.IsTrue(driverDriver.IsDriverIntialized(), "The driver should have been initialized");
        }
Beispiel #3
0
 public void HandleErrors(SeleniumDriverManager sdm)
 {
     RawParse(sdm);
     if (Error != null)
     {
         throw new HintwiseException(Error);
     }
 }
        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);
        }
        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);
        }
Beispiel #6
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);
        }
 public void NotIntialized()
 {
     SeleniumDriverManager driverDriver = this.ManagerStore[typeof(SeleniumDriverManager).FullName] as SeleniumDriverManager;
     Assert.IsFalse(driverDriver.IsDriverIntialized(), "The driver should not be initialized until it gets used");
 }
Beispiel #8
0
 public HintwiseResponse RawParse(SeleniumDriverManager sdm)
 {
     Time = DateTime.Now.ToExtendedTime(TimeZoneKind.CurrentLocal).ToUTC();
     return(this);
 }
        public void NotIntialized()
        {
            SeleniumDriverManager driverDriver = this.ManagerStore.GetManager <SeleniumDriverManager>();

            Assert.IsFalse(driverDriver.IsDriverIntialized(), "The driver should not be initialized until it gets used");
        }