Capybara, finding within a css element

前端 未结 4 1324
时光说笑
时光说笑 2021-02-07 07:31

I\'m working with Ruby on Rails 3, Cucumber, and Capybara

I\'ve been searching for quite some time, and I can\'t figure out how to find a specific page element within a

4条回答
  •  情话喂你
    2021-02-07 07:53

    I guess all answers should work but now Capybara doesn't use should anymore it uses expect

    expect(page).to have_css("#table", :text => "[Name]")
    expect(page).to have_css('h2', :text => 'stuff')
    

提交回复
热议问题