Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
多数の行を持つテーブルがあります。これらの行は、その中のデータに固有の順序になっています。テーブル内の行の順序に関するテストを作成しようとしています。RSpec/Capybara を使用してこれを行う方法はありますか?
たとえば、xpathセレクターを使用してみることができます
within(:xpath, "//table/tr[1]/td") do page.should have_content('First row content') end within(:xpath, "//table/tr[2]/td") do page.should have_content('Second row content') end