Search code examples
google-chromewatirwatir-webdriver

Stylesheets not applied in Chrome


Using Watir with Chromedriver. When running tests (not headless), my stylesheets are not applied. When running chrome normally (not testing) my stylesheets show up.

What's the deal? This didn't happen yesterday.

Specs:

  • Ubuntu 16.04 LTS
  • Chrome Version 59.0.3071.104 (Official Build) (64-bit)
  • ChromeDriver 2.30.477691 (6ee44a7247c639c0703f291d320bdf05c1531b57)
  • watir 6.2.1
  • ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]

Solution

  • I assume that you are accessing the application-under-test via embedded credentials. Chrome v59 removes support for embedded credentials in subresource requests. Here's what the documentation says:

    Drop support for embedded credentials in subresource requests. (removed)

    We should block requests for subresources that contain embedded credentials (e.g. "http://ima_user:hunter2@example.com/yay.tiff"). Such resources would be handled as network errors