title: accessing variables from executescript function
body: <p>I'm looking to set some data dynamically during testing using browser.executescript. Something like:</p>
  
  <pre><code>var x;
  browser.executeScript(function () {
    var something = x;
  });
  </code></pre>
  
  <p>But x seems to be out of the scope of the function being run. Is there a way for me to pass arguments that will be in the inner scope?</p>
  
  <p>Any help greatly appreciated
  C</p>