Read more

Disable text-transforms in Selenium tests

Tobias Kraze
September 23, 2013Software engineer at makandra GmbH

This doesn't seem to be an issue when testing with Chrome instead of Firefox.

Using text-transform: uppercase - especially on form labels - can cause you serious headaches in Selenium tests. Sometimes the web driver will see the uppercase text, sometimes it won't, and umlauts will be a problem as well.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

Simply disable it in tests, by

  • adding a body class for tests

    %body{'data-environment' => Rails.env}
    
  • overriding the transforms

    [data-environment="test"] *
      text-transform: none !important
    
Posted by Tobias Kraze to makandra dev (2013-09-23 11:30)