title: Capybara + Poltergeist + Phantomjs. Unable to click a button
body: <p>i have a button, upon clicking it will change the display of a div from none to block. I wanted to click on the button, have the div displayed as 'block', click "Done" and then the div's display become 'none'. Capybara was able to click on the 1st button but it couldn't seem to find the 2nd button "Done". I tried several ways: </p>
  
  <pre><code>click_on("Done")
  find_button("Done").trigger('click')
  find_button("Done").trigger('click')
  find_link("Done").trigger('click')
  </code></pre>
  
  <p>I even tried to use javascript:</p>
  
  <pre><code>page.execute_script("document.getElementById('button_done').click()")
  </code></pre>
  
  <p>but nothing happens. I printed out the display property of the pop-up div prior to the clicking "Done" and after the clicking to check if the button was click but both statements gave me the div's property as 'block' (expected 'block' before clicking "Done" and changed to "none" after the clicking). 
  I allowed it to sleep(10) but doesn't seem to help. </p>
  
  <p>I used the same javascript on the page console and it worked as it should be.</p>
  
  <p>Any inputs? </p>
  
  <p>Thanks</p>
  
  <p>EDIT:</p>
  
  <p>feature:</p>
  
  <pre><code>Given I click on "Create an item"
  And I chose an option
  Then I should be able to create an item
  </code></pre>
  
  <p>steps:</p>
  
  <pre><code>step "I chose an option" do
    within ('#web') do
      click_on "On"
    end
    sleep 3
    #Here is where the div gets displayed with the 'Done' button
    find('#button_done').click #(doesn't work though)
    sleep 3
    click('Create')
  end
  </code></pre>