title: Verify an element is not existing using webdriver and selenium
body: <p>I'm using <a href="http://webdriver.io" rel="nofollow noreferrer">WebdriverIO</a> and <code>selenium-standalone</code> to write automated tests that will verify that various parts of our user interface are working. </p>
  
  <p>I need to verify that an element is not present on the page. For example, our system allows staff to track various types of resources that we are referring clients to. If a staff member accidentally adds the wrong resource, they can delete it, and I want to verify that the resource was actually deleted and is not present on the page. </p>
  
  <p>WebdriverIO has an <code>.isExisting()</code> property, but no way to check if something is not existing (or not visible/present). I could also use <a href="http://chaijs.com/" rel="nofollow noreferrer">Chai</a> assertions to figure this out, but haven't delved into that world yet. </p>
  
  <p>Here's a snippet of my code:</p>
  
  <pre><code>it('I can delete a resource from a need', function() {
      return driver
      .moveToObject('span.ccx-tasklist-task') // Hover mouse over resource
      .click('div.referral-controls a.btn.dropdown-standalone') // Click Resource drop-down
      .click('div.referral-controls.ccx-dropdown-menu-selected li &gt; a') // Delete Resource
      .pause(2000);
      // Need to Verify that resource was deleted here
  </code></pre>
  
  <p>Any advice? Let me know if you need more information.</p>