title: How to get HashTable with Selenium ExecuteScript function
body: <p>with Selenium WebDriver, to get all html attributes at once for a Tag in C#, I do this </p>
  
  <pre><code>ReadOnlyCollection&lt;object&gt; HtmlAttributes = (ReadOnlyCollection&lt;object&gt;)((IJavaScriptExecutor)Driver).ExecuteScript("var s = []; var attrs = arguments[0].attributes; for (var l = 0; l &lt; attrs.length; ++l) { var a = attrs[l]; s.push(a.name + ':' + a.value); } ; return s;", ele);
  </code></pre>
  
  <p>But with this JavaScript code, I got an array with values :</p>
  
  <pre><code>HtmlAttributes[index] = "HtmlAttribute:Value".
  </code></pre>
  
  <p>Is it possible to get an hashtable? For example:</p>
  
  <pre><code>HtmlAttributes[HtmlAttribute] = "Value"
  </code></pre>