title: Selenium Headless Chrome React onMouseEnter
body: <p>I have a weird problem. For my testing I am trying to run selenium with a headless chrome version. I use nightwatch to test my javascript React application.</p>
  
  <p>One of my components uses the onMouseEnter event to display a submenu, but when I use nightwatch's moveToElement method it works with normal chrome but not with headless chrome. It gives me no error but the submenu is simply not shown.</p>
  
  <p>This is my nightwatch test:</p>
  
  <pre><code>browser
        // Load the page at the launch URL
        .url(browser.launchUrl).useXpath()
        // wait for page to load
        .waitForElementVisible("//ul/li/div/span[text()='Login']", 5000)
        //hover over Login
        .moveToElement("//ul/li/div/span[text()='Login']", 10, 10)
        //wait for submenu
        .waitForElementVisible("//ul/li/ul/li/a/span[text()='Login']", 500)
  </code></pre>
  
  <p>When I run it with normal chrome it successfully finishes the test, but with chrome --headless I get the following error:</p>
  
  <pre><code>- open login modal (5.22s)
  Timed out while waiting for element &lt;//ul/li/ul/li/a/span[text()='Login']&gt; to be present for 500 milliseconds.  - expected "visible" but got: "not found"
     at Object.open login modal
     at process._tickCallback
  </code></pre>
  
  <p>I am quite not sure why this happens in headless mode and how I can prevent that.</p>
  
  <p>Edit: I fixed now my problem by updating my react menu component (rc-menu v5 => v7) and now it works also in headless mode, although I still don't know why it didn't work before...</p>