title: Selenium C# OpenQA.Selenium.NoSuchElementException
body: <p>Trying to simply click on a textbox but get an OpenQA.Selenium.NoSuchElementException error. I've tried all possible combinations of using ids, cssSelectors, xPath, but got no luck. I also added different wait times and different implicit wait and explicit wait, however, it didn't solve the problem.</p>
  
  <p>I get the OpenQA.Selenium.NoSuchElementException right when I am waiting for the element to be visible.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    //Open URL of Service Now
      driver.Url = "https://-------.service-now.com/"; //censored
      System.Threading.Thread.Sleep(5000);
  
      driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
      WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
      wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector("#user_name")));
      wait.Until(ExpectedConditions.ElementToBeClickable(By.CssSelector("#user_name")));
      driver.FindElement(By.CssSelector("#user_name")).Click();
  </code></pre>
  
  <p>Here is an image of the CSS:
  <a href="https://i.stack.imgur.com/L5F9s.png" rel="nofollow noreferrer">Image of CSS</a></p>