コード例 #1
0
        public void TestLocatorUsingCssTagName()
        {
            var by = WebDriverExtensions.UsingLocator("input[type='checkbox']");

            Assert.AreEqual("By.CssSelector: input[type='checkbox']", by.ToString());
        }
コード例 #2
0
        public void TestLocatorUsingMultipleCss()
        {
            var by = WebDriverExtensions.UsingLocator("div input[id='okbutton']");

            Assert.AreEqual("By.CssSelector: div input[id='okbutton']", by.ToString());
        }
コード例 #3
0
        public void TestLocatorUsingCss()
        {
            var by = WebDriverExtensions.UsingLocator(".main-content");

            Assert.AreEqual("By.CssSelector: .main-content", by.ToString());
        }
コード例 #4
0
        public void TestLocatorUsingXpath()
        {
            var by = WebDriverExtensions.UsingLocator("//*[@type='text']");

            Assert.AreEqual("By.XPath: //*[@type='text']", by.ToString());
        }
コード例 #5
0
        public void TestLocatorUsingId()
        {
            var by = WebDriverExtensions.UsingLocator("test-of-div");

            Assert.AreEqual("By.Id: test-of-div", by.ToString());
        }
コード例 #6
0
        public void TestLocatorUsingCssId()
        {
            var by = WebDriverExtensions.UsingLocator("#test");

            Assert.AreEqual("By.CssSelector: #test", by.ToString());
        }