Cast value of :text to string

Reason is same as here - https://github.com/jnicklas/capybara/pull/988#discussion_r3222892