Achieving blur in Capybara

by Jason Swett,

To achieve blur in Capybara, just “click” on the body of the page:

page.find("body").click

One thought on “Achieving blur in Capybara

  1. Tamlyn Rhodes

    This frequently doesn’t work for me. I don’t know if it’s a React thing but it makes Capybara click on the most recently added DOM node.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *