Skip to content
Browse files

Added section about selectors to README

  • Loading branch information...
1 parent d3a11f0 commit 73135119d156bff3c7b3b3e6b9f52c93961145a1 @jnicklas committed
Showing with 14 additions and 0 deletions.
  1. +14 −0 README.rdoc
14 README.rdoc
@@ -153,6 +153,20 @@ For ultimate control, you can instantiate and use a session manually.
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

0 comments on commit 7313511

Please sign in to comment.
Something went wrong with that request. Please try again.