How can I determine if a radio button is checked already?

Olivier picture Olivier · Jul 23, 2009 · Viewed 11.1k times · Source

I'm using webrat with cucumber and I would like to test if a radio button is checked already when I am on a page. How can I do that ? I didn't find any step in webrat which can do that.

Answer

evedovelli picture evedovelli · Feb 22, 2014
expect(find_field("radio_button_name")).to be_checked