using OpenQA.Selenium.Firefox;
public class AutomationPractice
ddd = new FirefoxDriver();
ddd.Navigate().GoToUrl("http://example.com/login");
ddd.FindElement(By.Id("username")).SendKeys("user1");
ddd.FindElement(By.Id("password")).SendKeys("pass1");
ddd.FindElement(By.Id("loginButton")).Click();
if (ddd.FindElement(By.Id("welcomeMessage")).Text == "Welcome user1!")
Console.WriteLine("Test Passed");
Console.WriteLine("Test Failed");
ddd = new FirefoxDriver();
ddd.Navigate().GoToUrl("http://example.com/login");
ddd.FindElement(By.Id("username")).SendKeys("user1");
ddd.FindElement(By.Id("password")).SendKeys("pass1");
ddd.FindElement(By.Id("loginButton")).Click();
ddd.FindElement(By.Id("logoutButton")).Click();
if (ddd.Url == "http://example.com/login")
Console.WriteLine("Test Passed");
Console.WriteLine("Test Failed");