Exemplo n.º 1
0
        public void TestMethod1()
        {
            PageAction.OpenHomePage();
            var webItemTextBox = new WebItem("world__searchInput");

            webItemTextBox.SetValue(City);
            webItemTextBox.PressKeyEnter();
            var getUrl = BrowserFramework.WebDriver.Url;

            Assert.IsTrue(getUrl.Contains(CityInUrl));
        }
Exemplo n.º 2
0
        public static IWebElement FindWebElement(WebItem webItem)
        {
            if (webItem.ClassName != "")
            {
                return(WebDriver.FindElementByClassName(webItem.ClassName));
            }

            if (webItem.XPath != "")
            {
                return(WebDriver.FindElementByXPath(webItem.XPath));
            }


            return(null);
        }