title: How is the internal id of a WebDriver WebElement computed? Pass multiple elements to JavaScript Executor
body: <p>I'd like to know how the id of a WebElement in WebDriver is internally computed. I need it because i am writing an extension which should boost the performance in cases you need to perform more than one JavaScript command at once.</p>
  
  <p>Example code in Java which retrieves the ID:</p>
  
  <pre><code>RemoteWebElement element = driver.findElement(
      By.cssSelector("div#header &gt; img.logo")
  );
  String id = element.getId();
  // id is something like: {390f457d-406b-458a-b4a6-dfebb24aae36}
  </code></pre>
  
  <p>So, i want to pass more than one WebElement to a JavaScript executor, can i achieve it by sending a list of all id's? <strong>I need a possibility to retrieve the DOM element in JavaScript only by knowing these id's.</strong></p>
  
  <p>I guess the solution is somewhere hidden in the webdriver.xpi implementation. I use the Firefox WebDriver.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Ok, let me rephrase my question. Assumed i want to do something with a WebElement in Javascript i can do something like this:</p>
  
  <pre><code>((JavascriptExecutor) driver).executeScript("jQuery(arguments[0]).doSomething()", myElement);
  </code></pre>
  
  <p>But how can i pass multiple WebElements (an arbitrary amount) to the script?</p>