样式表未在Chrome中应用 [英] Stylesheets not applied in Chrome

查看:184
本文介绍了样式表未在Chrome中应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Watir和Chromedriver。运行测试时(不是无头),我的样式表不适用。正常运行chrome(不测试)时,我的样式表显示出来。



这是怎么回事?这是昨天没有发生的。

规格:


  • Ubuntu 16.04 LTS

  • Chrome版本59.0.3071.104(官方版本)(64位) b
  • ChromeDriver 2.30.477691(6ee44a7247c639c0703f291d320bdf05c1531b57)
  • watir 6.2.1

  • ruby​​ 2.3.1p112(2016-04-26)[x86_64-linux-gnu]

解决方案

我假设您正在通过嵌入凭证访问被测应用程序。 Chrome v59取消了对子资源请求中嵌入凭据的支持。以下是文档所说的内容:


删除子资源请求中嵌入凭据的支持。 (已删除)

我们应该阻止对包含嵌入的
凭证的子资源的请求(例如 http:// ima_user:hunter2@example.com/yay.tiff )。
此类资源将作为网络错误处理



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]

解决方案

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

这篇关于样式表未在Chrome中应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆