public void ShouldLocateCustomWebElement()
        {
            var element = PageAlpha.FindElement <HtmlElement>(By.Id("hamlet"));

            Assert.That(element, Is.Not.Null);
            Assert.That(element.Text, Is.EqualTo("Something is rotten in the state of Denmark ..."));
        }
        public void ShouldLocateListOfCustomWebElements()
        {
            var elementList = PageAlpha.FindElements <HtmlElement>(By.CssSelector("li"));

            Assert.That(elementList, Is.Not.Null);
            Assert.That(elementList.Count, Is.EqualTo(3));
        }
 public void OpenTestPage()
 {
     WebDriver.Navigate().GoToUrl(new Uri(Path.GetFullPath(InitialUrl)).AbsoluteUri);
     PageAlpha = PageFactory.Create <PageAlpha>(WebDriver);
 }
Ejemplo n.º 4
0
 public void SetUp()
 {
     elementList = PageAlpha.FindElement <HtmlElement>(By.Id("element-list"));
     hamlet      = PageAlpha.FindElement <HtmlElement>(By.Id("hamlet"));
 }