Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Clicking link with the text "Click link"
var links = [].filter.call(document.querySelectorAll("a"), el => el.textContent.indexOf("Click Link") === 0);
if (links.length == 0) {
return callback(new Error("No link found"));
}
links[0].click()
callback(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment