Executes a JavaScript function within the browser context
test.open('http://adomain.com')
.execute(function () {
document.getElementById('test').innerText = 'Whatever';
})
.done();
You can also apply arguments to the function
test.open('http://adomain.com')
.execute(function (paramFoo, aBar) {
document.getElementById('test').innerText = paramFoo + aBar;
}, 'foo', 'bar')
.done();