We hope that the results of filling out the form are visible to the user in some way. So you can think along these lines of BDD-esque:
When I create a new movie Then I should see my movie page
Thus, your steps of the "new movie" will enter the field and send. And your βThenβ will claim that the movie appears with your input.
element = driver.find_element(:id, "movie_title") element.send_keys 'The Good, the Bad, the Ugly' # etc. driver.find_element(:id, "submit").click
Now I'm just doing it, but this is what I came to. This certainly seems more verbose than something like Capybara:
fill_in 'movie_title', :with => 'The Good, the Bad, the Ugly'
Hope this helps.
source share