[Binding]
  public sealed class UserLoginSteps : IDisposable
  {
    private readonly IWebDriver _driver;
    private const string HOME_PAGE_URL = "
https://seankilleen.com";
    private readonly Uri _homePageUri;
    private readonly ScenarioContext _scenarioContext;
    public UserLoginSteps(ScenarioContext scenarioContext)
    {
      _scenarioContext = scenarioContext;
      _homePageUri = new Uri(HOME_PAGE_URL);
      _driver = new ChromeDriver(); // TODO: Add specific driver location if not in bin folder.
    }
    [Given(@"I am on the home page")]
    public void GivenIAmOnTheHomePage()
    {
      _driver.Navigate().GoToUrl(_homePageUri);
    }
    [When(@"I enter the username (.*)")]
    public void WhenIEnterTheUsernameUser(string username)
    {
      UsernameField().SendKeys(username);
    }
    [When(@"I enter the password (.*)")]
    public void WhenIEnterThePasswordPassword(string password)
    {
      PasswordField().SendKeys(password);
    }
    [When(@"I click login")]
    public void WhenIClickLogin()
    {
      LoginButton().Click();
    }
    [Then(@"I should be authenticated")]
    public void ThenIShouldBeAuthenticated()
    {
      var manageProfileImage = ManageProfileImage();
      Assert.That(manageProfileImage, Is.Not.Null); // TODO: Replace with your own test
    }
    [AfterScenario]
    public void AfterScenario()
    {
      LogoutOfSite();
    }
    private void LogoutOfSite()
    {
      MoveOverManageProfileImage();
      ManageProfileImage().Click();
      ProfileLogoutButton().Click();
    }
    private IWebElement ProfileLogoutButton()
    {
      return _driver.FindElement(By.XPath("/html/body/div/main/nav/div/div[2]/ul/li[4]/div/a[3]"));
    }
    private void MoveOverManageProfileImage()
    {
      var clickNavbarProfileImage = new Actions(_driver);
      clickNavbarProfileImage.MoveToElement(ManageProfileImage());
      clickNavbarProfileImage.Build().Perform();
    }
    public void Dispose()
    {
      _driver?.Dispose();
    }
    private IWebElement ManageProfileImage()
    {
      return _driver.FindElement(By.XPath("//*[@id='navbarDropdownProfile']/img"));
    }
    private IWebElement LoginButton()
    {
      return _driver.FindElement(By.CssSelector("#account > div:nth-child(7) > div > button"));
    }
    private IWebElement PasswordField()
    {
      return _driver.FindElement(By.Id("Input_Password"));
    }
    private IWebElement UsernameField()
    {
      return _driver.FindElement(By.Id("Input_Email"));
    }
  }