Please note I'm new to SitePrism. I'm putting together a Capybara feature test case for editing data. The form's ID is "edit_bears_1", where you can imagine the #1 changes based on the current object's ID.
<form class="form-horizontal validate-form" id="edit_bears_1" action="admin/bears/1" accept-charset="UTF-8" method="post" novalidate="novalidate">
Here is the SitePrism file I created to define the form:
module Pages
module Admin
module Bears
class Edit < SitePrism::Page
set_url '/admin/bears/edit/:id'
set_url_matcher %r{/admin/bears/\d+/edit}
binding.pry
section :form, Form, "form#edit_bears_1"
end
end
end
end
As you can see I currently have the form's ID hard-coded to #1, but this is likely to change. How can I replace #1 with the some sort of variable that gets evaluated to and is linked to the bear I'm editing? All help is appreciated!