Cucumber and Capybara: Should use rendered.should, page.should or response.should?

Which of the following should I use for cucumber functions that use capybara ?:

rendered.should have_selector
page.should have_selector
response.should have_selector

I can't seem to get them to work - I get a different error message for each

+3
source share
2 answers

The right way is page.should have_selector. See the README Query Section for more documentation.

(There is no method called rendered(which I know), but responseexists in Capybara::Driver::RackTest, but I'm not sure how to use it - I never need it.)

+4
source

After some complicated google code search, the answer seems

response.should have_selector
0

Source: https://habr.com/ru/post/1789748/


All Articles