admc/wd — pull request #134 by txase (2013-06-24 20:06:52+00:00)
Title: Add queueAddAsync command

When chaining commands, it is sometimes necessary to have an async
command that calls a provided callback when complete. For example:

driver.chain()
...
.queueAddAsync(function(cb) {
http.get('http://google.com', function(res) {
if (res.statusCode === 200)
cb();
else
cb(new Error('Failed to reach google.com'));
});
})
...

This commit adds the queueAddAsync functionality. It may be called with
an optional second argument function that is run synchronously after
the first function completes. This mimics the behavior of all the other
wd methods.