title: Get all element attributes using protractor
body: <p>According to the documentation, to get a single attribute by name you can use <a href="http://angular.github.io/protractor/#/api?view=webdriver.WebElement.prototype.getAttribute" rel="nofollow"><code>.getAttribute()</code></a> on a <code>WebElement</code>:</p>
  
  <pre><code>var myElement = element(by.id('myId'));
  expect(myElement.getAttribute('myAttr')).toEqual('myValue');
  </code></pre>
  
  <p>But how can I get all of the attributes that an element has? </p>
  
  <p>There is no information about this use case/functionality in the <a href="http://angular.github.io/protractor/#/api" rel="nofollow">Protractor API</a>.</p>