Behat/Mink — Issue #207: Need case-insensitive assertions
Author: markct
Created: 2012-03-01 14:18:18+00:00
State: open

We are using Behat+Mink+Sahi to test a website that uses CSS text-transform:uppercase extensively. As noted at https://github.com/Behat/Mink/issues/186, the case of text returned by Sahi's getText() varies by browser. This issue has been reported to Sahi at http://sahi.co.in/forums/viewtopic.php?pid=13307 with no real response (as of the time of this writing).

It seems to me that the best solution to this issue is to do case-insensitive matching in the assertions in BaseMinkContext. Even if the Sahi bug did not exist, tests which depend on capitalization are too fragile. Rarely, if ever, do we care about whether the text is capitalized a certain way.

Perhaps this could be activated in the configuration, or it could be specified somehow in the step?

For us the choice is either to override the step definitions in BaseMinkContext, or stop running tests in Firefox.