Skip to content

Files

Latest commit

 

History

History
27 lines (17 loc) · 469 Bytes

Capybara-RSpec-HaveSelector.md

File metadata and controls

27 lines (17 loc) · 469 Bytes

Pattern: Use of have_selector

Issue: -

Description

Use have_css or have_xpath instead of have_selector.

Examples

# bad
expect(foo).to have_selector(:css, 'bar')

# good
expect(foo).to have_css('bar')

# bad
expect(foo).to have_selector(:xpath, 'bar')

# good
expect(foo).to have_xpath('bar')

Further Reading