title: OpenQA.Selenium.ElementNotVisibleException:Element is not currently visible and so may not be interacted with
body: <p>I am trying to call a method using if..else. Below is the C# code from which i am trying  to send a string country to get selected from dropdown. I expect method WePay() to get  called. But getting the element not visible exception.</p>
  
  <pre><code>String country = "United States - US Dollars ($)";
  
  new SelectElement(wd.FindElement(By.Id("CountrySelector"))).SelectByText(country);
  
  if (country != "United States - US Dollars ($)")
  {
      PayPal();
  }
  else
  {
      WePay();
  }
  </code></pre>
  
  <p>Below is the C# code for method <code>WePay()</code></p>
  
  <pre><code>public void WePay()
  {
      wd.FindElement(By.XPath("//button[@onclick='ValidateSubmit()']")).Click();
      wd.FindElement(By.Id("addAmount")).Click();
      wd.FindElement(By.Id("addAmount")).SendKeys("10");
      wd.FindElement(By.XPath("//button[@onclick='PayNow();']")).Click();
      wd.FindElement(By.Id("new-cc")).Click();
      new SelectElement(wd.FindElement(By.Id("Card_TransactionTypeId"))).SelectByText("Visa");
      wd.FindElement(By.Id("Number")).SendKeys("4003830171874018");
      wd.FindElement(By.Id("CVV")).SendKeys("527");
      new SelectElement(wd.FindElement(By.Id("Card_ExpirationMonth"))).SelectByText("10");
      new SelectElement(wd.FindElement(By.Id("Card_ExpirationYear"))).SelectByText("2020");
      wd.FindElement(By.Id("saved-address")).Click();
      new SelectElement(wd.FindElement(By.Id("AddressSelector"))).SelectByValue("69918");
      wd.FindElement(By.Id("submitButton")).Click();
  
  }
  </code></pre>