within_fieldset
takes the id or legend text of the fieldset - http://www.rubydoc.info/gems/capybara/Capybara/Session#within_fieldset-instance_method - so it's not really surprising within_fieldset('fieldset')
isn't working for you. How you can do what you want really depends on how you're HTML is structured. For instance if you're fieldsets have legends
<fieldset>
<legend>Something</legened>
...
</fieldset>
<fieldset>
<legend>Other thing</legened>
...
</fieldset>
You can do
within_fieldset('Other thing') do
...
end
If you don't have legends, but have wrapping elements
<div id="first_section">
...
<fieldset>...</fieldset>
<div>
<div id="second_section">
<fieldset>...</fieldset>
</div>
then you can just scope using CSS to the correct fieldset
within('#second_section fieldset') do
...
end
If instead the fieldsets are siblings
<div>
<fieldset>...</fieldset>
<fieldset>...</fieldset>
</div>
then you can just scope to the second fieldset with a CSS sibling selector
within("fieldset + fieldset") do
...
end