Last active
November 2, 2015 20:34
-
-
Save EeroHeroHeino/4cecc5dcf407af10b7a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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