| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 
 | it('should be able to inject JavaScript into the page that can be execute asynchronously', function () {var divCount = browser.selectorExecuteAsync("//div", function(divs, message, callback) {
 callback(divs.length + message);
 }, " divs on the page")
 console.log(divCount);
 
 var divLinkCount = browser.selectorExecuteAsync(["//div", "=Read Post"], function(divs, links, callback) {
 var message = 'There are ';
 
 message += divs.length + ' divs on the page';
 message += ' and ';
 message += links.length + ' links with an link text "' + links[0].text + '"';
 
 callback(message);
 })
 console.log(divLinkCount);
 });
 
 |