1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Added section about selectors to README

This commit is contained in:
Jonas Nicklas 2009-11-26 23:48:18 +01:00
parent d3a11f0f85
commit 73135119d1

View file

@ -153,6 +153,20 @@ For ultimate control, you can instantiate and use a session manually.
end
session.click_link 'Sign in'
== XPath an CSS
Capybara does not try to guess what kind of selector you are going to give it,
if you want to use CSS with your 'within' declarations for example, you'll need
to do:
within(:css, 'ul li') { ... }
Alternatively you can set the default selector to CSS, which may help if you are
moving from Webrat and used CSS a lot, or simply generally prefer CSS:
Capybara.default_selector = :css
within('ul li') { ... }
== Gotchas:
* Install JRuby and the 'celerity' gem, version 0.7.4 (0.7.5 has a bug with