title: how to reload page until a button appears using capybara and ruby
body: <p>I want to click a button after an action and button does not appear until and unless I reload the page. And some times it takes some time to appear the button and I have to reload page for more than once. I don't want to put static delays. So is there a way to achieve following using capybara and ruby:</p>
  
  <pre><code>  do
      page.evaluate_script("window.location.reload()")
    until a button appears
  </code></pre>