Not logged in (Log in or Sign up)

unwwwritten

cucumber/webrat and utf-8

If you are having a problem selecting an option on a form in cucumber/webrat and the option happens to contain foreign characters...

DOH! Make sure you set the character set in your html or the option will not be found.

In haml...

%meta{:'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8'}

In html/erb...

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

Now it should work.

blog comments powered by Disqus