I am trying to check if a div has a child with particular class in Capybara, using the following piece of code:
expect(find("#admin-row-1 .glyphicon-ban-circle")).to_not be_empty
Upon debug, I get the following output
(byebug) find("#admin-row-1 .glyphicon-ban-circle")
#<Capybara::Node::Element tag="a" path="/html/body/main/div[2]/div/div/div/table/tbody/tr[3]/td[3]/a[2]">
But still, getting the following expectation error
Failure/Error: expect(find("#admin-row-1 .glyphicon-ban-circle")).to_not be_empty
expected #<Capybara::Node::Element tag="a" path="/html/body/main/div[2]/div/div/div/table/tbody/tr[3]/td[3]/a[2]"> to respond to `empty?`