Skip to content

Instantly share code, notes, and snippets.

@asciidisco
Created October 7, 2013 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asciidisco/6868951 to your computer and use it in GitHub Desktop.
Save asciidisco/6868951 to your computer and use it in GitHub Desktop.
Dalek Execute DOM Manipulator

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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment