title: ElementNotVisibleException: Message: element not interactable error while trying to click on the top video in a youtube search
body: <p>I cannot seem to find a way to click on the right element in order to get the url I am looking for. In essence I am trying to click on the <strong>top</strong> video in a youtube search (the most highly ranked returned video). </p>
  
  <p><a href="https://stackoverflow.com/questions/43868009/how-to-resolve-elementnotinteractableexception-element-is-not-visible-in-seleni">How to resolve ElementNotInteractableException: Element is not visible in Selenium webdriver?</a> 
  -> This is for Java but it let me in the right direction (knowing I needed to execute JavaScript)</p>
  
  <p><a href="http://www.teachmeselenium.com/2018/04/17/python-selenium-interacting-with-the-browser-executing-javascript-through-javascriptexecutor/" rel="nofollow noreferrer">http://www.teachmeselenium.com/2018/04/17/python-selenium-interacting-with-the-browser-executing-javascript-through-javascriptexecutor/</a> 
  -> This shows me how I should try to execute the javascript in python. </p>
  
  <p>I have also seen countless articles about waits but they do not solve my problem. </p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  import time
  
  wrds = ["Vivaldi four seasons", "The Beatles twist and shout", "50 
  cent heat"] #Random list of songs
  
  driver = webdriver.Chrome()
  
  for i in wrds:
      driver.get("http://www.youtube.com")
      elem = driver.find_element_by_id("search")
      elem.send_keys(i)
      elem.send_keys(Keys.RETURN)
  
      time.sleep(5)
      driver.execute_script("arguments[0].click()",driver.find_element_by_id('video-title')) #THIS CLICKS ON WRONG VIDEO
      #elem = driver.find_element_by_id("video-title").click() #THIS FAILS
      time.sleep(5)
  
      url = driver.current_url
  
  driver.close()
  </code></pre>
  
  <p>I get a <code>ElementNotVisibleException: Message: element not interactable</code> error when I do not execute any javascript (even though it has actually worked before it is just no way near robust). When I do execute the javascript it clicks on the wrong videos. </p>
  
  <p>I have tried all types of waits "Explicit" and "Implicit" this did now work. 
  I am quite sure I need to execute some JavaScript but I don't know how.</p>