title: Unable to locate an input box element using Selenium and Python
body: <p>So I have been trying to locate the username input box on python using selenium. I have tried xpath, id, class name, etc.</p>
  <p>I am also aware of explicit wait for the elements to load. However, depite all this, no luck. I checked to see if the element is in an iframe that I overlooked, but I couldn't find it.</p>
  <p>Here is the user input box element.</p>
  <pre><code>&lt;div class=&quot;panel-body&quot;&gt;
                      &lt;h1 class=&quot;text-normal&quot; role=&quot;banner&quot;&gt;Sign in to your account&lt;/h1&gt;
  
  
                      &lt;form action=&quot;/idp/profile/SAML2/Redirect/SSO?execution=e1s1&quot; method=&quot;post&quot;&gt;
                          &lt;legend&gt;
  Login to Qualtrics - co1
                          &lt;/legend&gt;
                                          
                          &lt;div class=&quot;form-group&quot;&gt;
                            &lt;label for=&quot;username&quot; class=&quot;hidden&quot;&gt;Username&lt;/label&gt;
                            &lt;div class=&quot;input-group&quot;&gt;
                              &lt;input id=&quot;username&quot; name=&quot;j_username&quot; type=&quot;text&quot; class=&quot;form-control&quot; tabindex=&quot;0&quot; placeholder=&quot;Username&quot; autocorrect=&quot;off&quot; autocapitalize=&quot;none&quot; spellcheck=&quot;false&quot; aria-label=&quot;Username&quot;&gt;
                              &lt;div class=&quot;input-group-addon&quot;&gt;@manhattan.edu&lt;/div&gt;
                            &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class=&quot;form-group&quot;&gt;
                            &lt;label for=&quot;password&quot; class=&quot;hidden&quot;&gt;Password&lt;/label&gt;
                            &lt;input id=&quot;password&quot; value=&quot;&quot; name=&quot;j_password&quot; type=&quot;password&quot; class=&quot;form-control&quot; placeholder=&quot;Password&quot; aria-label=&quot;Password&quot; autocomplete=&quot;off&quot;&gt;
                          &lt;/div&gt;                         
  
  
                                                    &lt;div class=&quot;form-element-wrapper&quot;&gt;
                              &lt;input type=&quot;checkbox&quot; name=&quot;donotcache&quot; value=&quot;1&quot; id=&quot;donotcache&quot;&gt;
                              &lt;label for=&quot;donotcache&quot;&gt;Don't Remember Login&lt;/label&gt;
                            &lt;/div&gt;
  
                        &lt;div class=&quot;form-element-wrapper&quot;&gt;
                          &lt;input id=&quot;_shib_idp_revokeConsent&quot; type=&quot;checkbox&quot; name=&quot;_shib_idp_revokeConsent&quot; value=&quot;true&quot;&gt;
                          &lt;label for=&quot;_shib_idp_revokeConsent&quot;&gt;Clear prior granting of permission for release of your information to this service.&lt;/label&gt;
                        &lt;/div&gt;
  
                          &lt;div class=&quot;form-element-wrapper&quot;&gt;
                            &lt;button class=&quot;btn btn-default&quot; type=&quot;submit&quot; name=&quot;_eventId_proceed&quot; onclick=&quot;this.childNodes[0].nodeValue='Logging in, please wait...'&quot;&gt;Login&lt;/button&gt;
                          &lt;/div&gt;
  
                        &lt;div class=&quot;clearfix&quot;&gt;&lt;/div&gt;
                      &lt;/form&gt;
                      
                        &lt;img src=&quot;https://s.qualtrics.com/login/static/xm_logo-16.png&quot; alt=&quot;Qualtrics - co1&quot;&gt;
                      &lt;hr&gt;
                      &lt;ul class=&quot;create-account&quot;&gt;
                          &lt;li&gt;&lt;a href=&quot;https://start.manhattan.edu/&quot;&gt; Forgot your password?&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;New student? &lt;a href=&quot;https://start.manhattan.edu/&quot;&gt;Get your JasperNet ID and password.&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href=&quot;https://inside.manhattan.edu/offices/its/client-services-hours-and-support.php&quot;&gt; Need Help?&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                      &lt;/div&gt;
  </code></pre>
  <p>Here is the code that I wrote up to locate the element.</p>
  <pre><code>WebDriverWait(browser,10).until(EC.presence_of_element_located((By.XPATH, '/html/body/div/div/div/div/div[3]/div[1]/div[1]/div/ul/li[1]/a')))
  browser.find_element_by_xpath('/html/body/div/div/div/div/div[3]/div[1]/div[1]/div/ul/li[1]/a').send_keys(&quot;test&quot;)
  </code></pre>