title: Unable to locate element with Selenium Python
body: <p>I am trying to click on an option from a menu using selenium with Python and I can't seem to get it to work. Below is the HTML code. I have tried Action Chains with <code>move_to_element(menu).click(submenu)</code> where <code>menu</code> is the <code>boardMenu-content</code> and <code>submenu</code> is the <code>boardMenu-reports...</code> and that didn't work.</p>
  <pre><code>&lt;div class=&quot;boardMenu&quot; tabindex=&quot;0&quot;&gt;
    &lt;div class=&quot;boardMenu-content&quot;&gt;
      &lt;button class=&quot;boardMenu-reports boardMenu-item boardMenu-itemButton&quot;&gt;
        &lt;i class=&quot;icons-reports boardMenu-icon&quot;&gt;&lt;/i&gt;
        Reports
      &lt;/button&gt;
    
  </code></pre>
  <p>I tried chaining the actions together like:</p>
  <pre><code>board = driver.find_element_by_class_name(&quot;boardMenu&quot;)
  menu = driver.find_element_by_class_name(&quot;boardMenu-content&quot;)
  rep = driver.find_element_by_class_name(&quot;boardMenu-reports boardMenu-item boardMenu-itemButton&quot;)
  actions = ActionChains(driver)
  actions.move_to_element(board)
  actions.move_to_element(menu)
  actions.click(rep)
  actions.perform()
  </code></pre>
  <p>but when I tried that I get the error that it can't find the element for <code>rep</code>. I also don't understand though why it is running <code>rep</code> in its line as apposed to in <code>actions.click(rep)</code>
  I have also deleted the chain action section and just run them one at a time with <code>time.sleep(3)</code> to give it all time to load and whatnot. Still get the error that it is unable to locate element.</p>