Read more

Turn off SSL for scenarios with Selenium

Dominik Schöler
September 07, 2011Software engineer at makandra GmbH

Selenium does not speak SSL because it uses WEBrick that doesn't. When you use Selenium for Cucumber scenarios that visit pages with SSL, they will fail.

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

To turn off SSL only for scenarios that are executed on WEBrick, put this method into your application controller.

def ensure_proper_protocol
  request.headers['SERVER_SOFTWARE'].andand.include?('WEBrick') || super
end
Posted by Dominik Schöler to makandra dev (2011-09-07 10:25)