Skip to content

Instantly share code, notes, and snippets.

@FremyCompany
Created June 12, 2017 22:05
Show Gist options
  • Save FremyCompany/a90ad828d720f2d0eab33075ecafb72f to your computer and use it in GitHub Desktop.
Save FremyCompany/a90ad828d720f2d0eab33075ecafb72f to your computer and use it in GitHub Desktop.
Debug WebDriver-generated mouse events
window.onclick = function(e) {
var d = document.createElement("div");
d.style = `position: fixed; top: ${e.clientY}px; left: ${e.clientX}px; outline: 3px solid ${e.ctrlKey ? 'green' : 'red'};`;
document.body.appendChild(d);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment