fill_in 'id_or_label_text', with: 'yamada'
check('チェックボックス1')
uncheck('チェックボックス1')
attach_file 'file', "#{fixture_path}/xxx.csv"
select('カテゴリ1', from: 'カテゴリ')
current_path.should == '/pages/1'
page.status_code.should be(200)
page.should have_title('たいとる')
should have_content '登録されました'
should have_no_content 'エラーがしました'
- チェックボックス(selectboxまたはradio)がチェックされて(いる|いない)
have_checked_field
have_unchecked_field
should have_field('id_or_label', with: 'value')
all('#table_id tr').should have(0).rows
find('#css_selecter').should be_visible
should have_table('table')
should have_selector('button', value: '実行')
should have_selector('h1#title', :content=>'Hello!')
find('#navigation').should have_button('Sign out')
should have_selector('#hoge_area', visible: true)
find(:xpath, '//li[contains(.//a[@href = "#"]/text(), "foo")]').value
- findした要素の値をshouldではなく参照する
find('#id').click
click_button 'id_or_label'