When I use the search form to search for "hello"

Search through the search form on the current page: the term is typed in the form's field and the form is submitted. It fails when the page has no search form.

Examples

When I use the search form to search for "hello"
When we use the search form to search for "contact"
And use the search form to search for "example"
When I use the search form to search for "Sample title"
And we use the search form to search for "widgets"

Pattern

When(/^(I |we )*use the search form to search for "([^"]*)?"$/, …)

Part of @webship-js/wordpress-steps (github.com/webship/wordpress-steps), a step pack for Webship-js 2.0.x.