  for (var i = 0; i < 10; i++) {
                // Alternatively move left/right and up/down.
                x += ((-1)**i) * i * 10;
                y -= ((-1)**i) * i * 10;
                actions.pointerMove(x, y);
            }
            actions.pointerMove(x, y)
              .pointerDown()
              .pointerUp()
              .send();
        }
        </script>
    </body>
</html>
