From 4a6e1026cb1571359989262da3d120eee7d41a5e Mon Sep 17 00:00:00 2001 From: Michael Leimstaedtner Date: Wed, 26 Feb 2020 16:38:25 +0100 Subject: [PATCH] Add a recommendation for "Capybara.match = :prefer_exact" to the README. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 5980f1d..de3fb2e 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,11 @@ Capybara.default_normalize_ws = true This will affect all Spreewald steps that are using Capybara's `:text` option. +Furthermore, we recommend setting [Capybara's matching strategy](https://github.com/teamcapybara/capybara/blob/master/README.md#strategy) to `:prefer_exact`. This will positively affect Spreewald steps as it prevents the `Capybara::Ambiguous` error in the edge case when two fields are matching the given name, but one of the matches includes the name only as a substring, + +```ruby +Capybara.match = :prefer_exact +```` ## Contributing