Skip to content

Instantly share code, notes, and snippets.

@erikhansen
Created June 6, 2024 17:12
Show Gist options
  • Save erikhansen/6747b436dde92f4159f2a2c8ade529c4 to your computer and use it in GitHub Desktop.
Save erikhansen/6747b436dde92f4159f2a2c8ade529c4 to your computer and use it in GitHub Desktop.
Force ReCaptcha to be invalid before submitting a form—for testing purposes
document.querySelectorAll("[name='g-recaptcha-response'], [name='token']").forEach(function(element) {
element.value = 'bad-recaptcha-token';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment