title: Testing whether certain elements are visible or not
body: <p>How do I find out if an element is visible or hidden in testacular (jasmine)?</p>
  
  <p>My DOM looks like:</p>
  
  <pre><code>&lt;div class="span5 value-entry"&gt;
      &lt;input type="text" ng-model="query.value" placeholder="Enter value" class="input-large" ng-show="genericInput(criteria.attribute)"&gt;
      &lt;select ng-model="query.value" ng-options="entry for entry in filteredValue(criteria.attribute)" class="input-medium" ng-show="!genericInput(criteria.attribute)"&gt;
          &lt;option value=""&gt;-- Select Value --&lt;/option&gt;.
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Either the select is shown or the input box, but not both. I wish to check which element is visible (based on some other criteria), but I can't seem to figure out how to get the code working. I have written the following code:</p>
  
  <pre><code>expect(element('.value-entry input').is(':visible')).toBe(true);
  </code></pre>
  
  <p>But I get an error:</p>
  
  <pre><code>TypeError: Object #&lt;Object&gt; has no method 'is'
  </code></pre>
  
  <p>How do I check if the input is visible and the select is hidden at the same time (and vice versa)?</p>
  
  <p><strong>EDIT :</strong> I wish to add here that this is an end to end test</p>