using protractor to get the disabled attribute on button not working
<p>I'm trying to get the disabled attr on a button it should be "disabled" but I don't seem to be getting the value. New to angular and protractor!</p>

<p>When I inspect the page this is what HTML I get for the button showing disabled is disabled, like it is on the page:</p>

<pre><code> &lt;button type="submit" class="button primary inverse" ng-disabled="!comment.$dirty &amp;&amp; comment.$valid" disabled="disabled"&gt;Save&lt;/button&gt;
</code></pre>

<p>The protractor test below returns 'Expected null to equal disabled'</p>

<pre><code>    var btnSave = element(by.css('.primary'));
    expect(btnSave.isPresent()).toBeTruthy();

    var attr = element(by.css('.primary')).getAttribute('disabled');

    expect(attr).toEqual("disabled");
</code></pre>

<p>When I try I get expected '' to equal disabled.</p>

<pre><code>expect(attr).toEqual("disabled");
</code></pre>

<p>Any ideas where I'm going wrong?</p>

<p>Thanks</p>