title: Selenium cant find element on element that exists in page
body: <pre><code>public class Sele
     {
          private IWebDriver driver;
          private StringBuilder verificationErrors;
          private string baseURL;
          private bool acceptNextAlert = true;
  
          public Sele( )
          {
              driver = new FirefoxDriver( );
              baseURL = "https://www.youtube.com/";
              verificationErrors = new StringBuilder( );
          }
  
          internal void LikeYoutubeVidWithAcc( string username, string password, string url )
          {
              driver.Navigate( ).GoToUrl( baseURL + "/" );
              driver.FindElement( By.XPath( "(//button[@type='button'])[2]" ) ).Click( );
              driver.FindElement( By.Id( "Email" ) ).Clear( );
              driver.FindElement( By.Id( "Email" ) ).SendKeys( "UserName" );
              driver.FindElement( By.Id( "next" ) ).Click( );
  
              driver.FindElement( By.Id( "Passwd" ) ).Clear( );
              driver.FindElement( By.Id( "Passwd" ) ).SendKeys( "Password" );
              driver.FindElement( By.Id( "signIn" ) ).Click( );
              driver.Navigate( ).GoToUrl( url );
              driver.FindElement( By.XPath( "(//button[@type='button'])[25]" ) ).Click( );
          }
  }
  </code></pre>
  
  <p>I'm having trouble signing in to youtube using selenium, for some reason it can't find the password element in the page. </p>
  
  <p>the error occurs at this line:</p>
  
  <pre><code> driver.FindElement( By.Id( "Passwd" ) ).Clear( );
  </code></pre>
  
  <p>Error message: </p>
  
  <pre><code>An unhandled exception of type 'OpenQA.Selenium.NoSuchElementException' occurred in WebDriver.dll
  
  Additional information: Unable to locate element: {"method":"id","selector":"Passwd"}
  </code></pre>
  
  <p>I know the element exists on the page, yet selenium can't find it.</p>
  
  <p>Page source when the error occurs: </p>
  
  <pre><code>&lt;div class="card signin-card      pre-shift         no-name shift-form"&gt;
    &lt;div id="cc_iframe_parent"&gt;&lt;iframe id="youtube" src="https://accounts.youtube.com/accounts/CheckConnection?pmpo=https%3A%2F%2Faccounts.google.com&amp;amp;v=-951713550&amp;amp;timestamp=1469398858532" style="visibility: hidden; width: 1px; height: 1px; position: absolute; top: -100px;"&gt;&lt;/iframe&gt;&lt;/div&gt;
    &lt;div class="circle-mask" style="background-image: none;"&gt;
    &lt;canvas id="canvas" class="circle" width="96" height="96"&gt;&lt;/canvas&gt;
    &lt;/div&gt;
    &lt;form novalidate="" method="post" action="https://accounts.google.com/signin/challenge/sl/password" id="gaia_loginform"&gt;
    &lt;input name="Page" value="PasswordSeparationSignIn" type="hidden"&gt;
    &lt;input name="GALX" value="bX35kb1ARtQ" type="hidden"&gt;
    &lt;input name="gxf" value="AFoagUWY2FAFLKhmD2_-vufme-BJ1jfACg:1469398858433" type="hidden"&gt;
    &lt;input name="continue" value="https://www.youtube.com/signin?next=%2F&amp;amp;hl=en&amp;amp;feature=sign_in_button&amp;amp;app=desktop&amp;amp;action_handle_signin=true" type="hidden"&gt;
    &lt;input name="service" value="youtube" type="hidden"&gt;
    &lt;input name="hl" value="en" type="hidden"&gt;
    &lt;input id="profile-information" name="ProfileInformation" value="APMTqulOYcx8i4BIKa7QX8vzLf8nHVle5wmAmPaLqZqa7bjp6poGeUD2zvzYvR46xap0wdwr2kQaxUuteML1f-hTwb_VW4ZDLaD0cYYzVup4THWBRGWMWv0" type="hidden"&gt;
    &lt;input id="_utf8" name="_utf8" value="☃" type="hidden"&gt;
    &lt;input name="bgresponse" id="bgresponse" value="!DwylDC1CEBfic73NLmFEPmLuo0jLmEwCAAAAH1IAAAAFCgASXF5p4wpYu2Whl5kDy5GtZSOFmQEOdst3NYj0yd4fKBLZxl94_2g92h7yeFimnFaHcZosa1A6tveg3lkaz-HEnxsgWWDRAptp3hXbMHf10f_l5URE4mup4YdMKniavQDRHw1mYbNpaTFcVbTQhb2Fq8zAY89pRskujAVj_FVIMin3uw8U3Ncz0sjSkkSBbSi7TneLgUGXSI-GHNUS6uVJGKfqXUCSMkdDA2d71bq-oANdlKwxKOyCAAIkcNAwwuROjGY1wiWaMRofROyHO3PfRvpdwtKP0MfCUCvFU88cdyXKHt-xyJO76CR96U3E5loZGOFscMs8BCy2KpyjeyE6yGHVcSAMFI9NgQfT0Gv5E4687eD__44iyMRuyd4xUYcetZAL" type="hidden"&gt;
    &lt;input id="pstMsg" name="pstMsg" value="1" type="hidden"&gt;
    &lt;input id="dnConn" name="dnConn" value="" type="hidden"&gt;
    &lt;input id="checkConnection" name="checkConnection" value="youtube:254:1" type="hidden"&gt;
    &lt;input id="checkedDomains" name="checkedDomains" value="youtube" type="hidden"&gt;
    &lt;div class="form-panel first valid" id="gaia_firstform"&gt;
    &lt;div style="transition-delay: 0ms;" class="slide-out hide-form"&gt;
    &lt;div class="input-wrapper focused"&gt;
    &lt;div id="identifier-shown"&gt;&lt;/div&gt;
    &lt;span role="alert" class="error-msg" id="errormsg_0_Email"&gt;&lt;/span&gt;
    &lt;/div&gt;
  &lt;div style="display: none" id="identifier-captcha"&gt;
  &lt;input name="identifiertoken" id="identifier-token" value="" type="hidden"&gt;
  &lt;input name="identifiertoken_audio" id="identifier-token-audio" type="hidden"&gt;
  &lt;div class="audio-box"&gt;
    &lt;div id="playIdentifierAudio"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="captcha-box" class="captcha-box"&gt;
    &lt;div id="captcha-img" class="captcha-img" data-alt-text="Visual verification"&gt;&lt;/div&gt;
    &lt;span class="captcha-msg"&gt;
    Letters are not case-sensitive
    &lt;/span&gt;
  &lt;/div&gt;
  &lt;label for="identifier-captcha-input" class="hidden-label"&gt;&lt;/label&gt;
  &lt;input id="identifier-captcha-input" name="identifier-captcha-input" class="captcha" placeholder="Enter the letters above" title="Type the characters you see or numbers you hear" type="text"&gt;
  &lt;/div&gt;
  &lt;input id="next" name="signIn" class="rc-button rc-button-submit" value="Next" type="submit"&gt;
    &lt;a class="need-help" href="https://accounts.google.com/signin/recovery?continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fnext%3D%252F%26hl%3Den%26feature%3Dsign_in_button%26app%3Ddesktop%26action_handle_signin%3Dtrue&amp;amp;service=youtube&amp;amp;ignoreShadow=0&amp;amp;hl=en"&gt;
    Need help?
    &lt;/a&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;a href="https://accounts.google.com/ServiceLogin?continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fnext%3D%252F%26hl%3Den%26feature%3Dsign_in_button%26app%3Ddesktop%26action_handle_signin%3Dtrue&amp;amp;service=youtube&amp;amp;hl=en" tabindex="-1"&gt;
    &lt;img id="back-arrow" class="back-arrow shift-form" aria-label="Back" tabindex="0" alt="Back" src="https://www.gstatic.com/images/icons/material/system/1x/arrow_back_grey600_24dp.png"&gt;
    &lt;/a&gt;
    &lt;div class="form-panel second"&gt;
    &lt;div style="transition-delay: 100ms;" class="slide-in"&gt;
    &lt;div&gt;
    &lt;p style="display: none;" id="profile-name"&gt;&lt;/p&gt;
    &lt;span id="email-display"&gt;email123456@gmail.com&lt;/span&gt;
    &lt;/div&gt;
    &lt;div&gt;
    &lt;div id="password-shown"&gt;&lt;div&gt;
    &lt;input name="Email" id="Email-hidden" spellcheck="false" class="hidden" value="" readonly="" autocomplete="off" type="email"&gt;
  &lt;label class="hidden-label" for="Passwd"&gt;Password&lt;/label&gt;
  &lt;input id="Passwd" name="Passwd" placeholder="Password" class="" type="password"&gt;
    &lt;/div&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;input id="signIn" name="signIn" class="rc-button rc-button-submit" value="Sign in" type="submit"&gt;
    &lt;label class="remember"&gt;
    &lt;input id="PersistentCookie" name="PersistentCookie" value="yes" checked="checked" type="checkbox"&gt;
    &lt;span&gt;
    Stay signed in
    &lt;/span&gt;
    &lt;div class="bubble-wrap" role="tooltip"&gt;
    &lt;div class="bubble-pointer"&gt;&lt;/div&gt;
    &lt;div class="bubble"&gt;
    For your convenience, keep this checked. On shared devices, additional precautions are recommended.
    &lt;a href="https://support.google.com/accounts/?p=securesignin&amp;amp;hl=en" target="_blank"&gt;Learn more&lt;/a&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;/label&gt;
    &lt;input name="rmShown" value="1" type="hidden"&gt;
    &lt;a id="link-forgot-passwd" class="need-help" href="https://accounts.google.com/signin/recovery?continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fnext%3D%252F%26hl%3Den%26feature%3Dsign_in_button%26app%3Ddesktop%26action_handle_signin%3Dtrue&amp;amp;service=youtube&amp;amp;checkedDomains=youtube&amp;amp;checkConnection=youtube%3A254%3A1&amp;amp;pstMsg=1&amp;amp;Email=wageeh14032%40gmail.com&amp;amp;ignoreShadow=0&amp;amp;hl=en"&gt;
    Forgot password?
    &lt;/a&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;span id="inge" style="display: none" role="alert" class="error-msg"&gt;
    Sorry, Google doesn't recognize that email. &lt;a href="https://accounts.google.com/SignUpWithoutGmail?service=youtube&amp;amp;continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fnext%3D%252F%26hl%3Den%26feature%3Dsign_in_button%26app%3Ddesktop%26action_handle_signin%3Dtrue&amp;amp;hl=en"&gt;Create an account&lt;/a&gt; using that address?
    &lt;/span&gt;
    &lt;span id="timeoutError" style="display: none" role="alert" class="error-msg"&gt;
    Something went wrong. Check your connection and try again.
    &lt;/span&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>