title: Human-like mouse movements via Selenium
body: <p><strong>The Story:</strong></p>
  
  <p>One of the approaches to solve captchas, like Google ReCaptcha, is to try to <em>imitate the human mouse actions</em>: movements, hovering and clicks.</p>
  
  <p><a href="https://stackoverflow.com/a/37220168/771848">Some users reported</a> that making mouse moves as <a href="https://en.wikipedia.org/wiki/B-spline" rel="noreferrer">B-spline curves</a> worked for them.</p>
  
  <p><strong>The Question:</strong></p>
  
  <p>How to move the mouse to a particular element following the B-spline trajectory via Selenium?</p>
  
  <hr>
  
  <p>Note that the regular <code>browser.actions().mouseMove(elm).perform();</code> would "jump" to the element straight and far too quickly. My understanding is that it is a matter of slowing down the movement speed, "jumping" from point to point smoothly following the mathematical model for the B-spline trajectory.</p>
  
  <p><sup>We are using Protractor/JavaScript, but the question is really language-agnostic.</sup>
  <sup>Note that I'm not trying to solve the captcha, or contribute to the "captcha-solving making new evil bots violating terms of use here and there" space. I'm just curious and eager to obtain more skills in the test automation space.</sup></p>