Clicking links with WebdriverIO
问题 I have a web page that I am trying to test via Webdriver I/O. My question is, how do I click a couple of links via a test? Currently, I have the following: var webdriverio = require('webdriverio'); var client = webdriverio.remote(settings).init() .url('http://www.example.com') .elements('a') .then(function(links) { for (var i=0; i<links.value.length; i++) { console.log('Clicking link...'); var link = links.value[i].ELEMENT; link.click().then(function(result) { console.log('Link clicked!'); })