I am using the C# selenium, Specflow and Nunit3 for performing above task. I am confused that how to validate the page. Later on, following task already i have done. Moreover, it Search for the link of Behavior driven development and navigates there.
Steps:
- Navigate to the [Wikipedia][1] site.
- Choose the English language
- Search for "Test Automation”
[TestFixture]
public class ChromeTesting : Hooks
{
[Test]
public void ChromeWikipediaTest()
{
//1- Navigate to the Wikipedia site
Driver.Navigate().GoToUrl("https://www.wikipedia.org");
//2- Get the search results panel that contains the link for each result.
Driver.FindElement(By.Name("search")).SendKeys("Test Automation");
Driver.FindElement(By.Name("go")).Click();
Assert.That(Driver.PageSource.Contains("Test Automation"), Is.EqualTo(true),
"Test Automation Does not Exits");
}
}}