Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted at 24. Aug '21

Capybara Ambiguous match, found 2 elements matching visible xpath “/html”

  4) some test
     Failure/Error: expect(page).to have_content('foo')

     Capybara::Ambiguous:
       Ambiguous match, found 2 elements matching visible xpath "/html"

The problem is there is HTML code after </html> tag.

Add Comment