Exemplo n.º 1
0
        public void TestGetNativePageLocationReturnsUrl()
        {
            var driver = new Mock <IWebDriver>(MockBehavior.Strict);

            driver.SetupGet(d => d.Url).Returns("http://localhost:2222/MyPage");

            var logger = new Mock <ILogger>(MockBehavior.Loose);

            var browser = new SeleniumBrowser(new Lazy <IWebDriver>(() => driver.Object), logger.Object);

            browser.EnsureOnPage <MyPage>();

            driver.VerifyAll();
        }
Exemplo n.º 2
0
        public void TestGetNativePageLocationReturnsUrl()
        {
            var driver = new Mock<IWebDriver>(MockBehavior.Strict);
            driver.SetupGet(d => d.Url).Returns("http://localhost:2222/MyPage");

            var logger = new Mock<ILogger>(MockBehavior.Loose);

            var browser = new SeleniumBrowser(new Lazy<IWebDriver>(() => driver.Object), logger.Object);

            browser.EnsureOnPage<MyPage>();

            driver.VerifyAll();
        }