运行测试时放宽Microsoft Edge CSP(WebDriver)(Content-Security-policy)

时间:2018-11-16 09:30:53

标签: selenium selenium-webdriver webdriver microsoft-edge content-security-policy

我正在尝试使用proctractor(webdriver,chromedriver)运行测试时放松Microsoft Edge CSP。

所以解决方案可以是

  1. 像“ --disable-csp”这样的标记,根据我的搜索结果不存在。
  2. 设置网络驱动程序/量角器。
  3. 加载一个扩展剂量,例如 Relaxing Chrome's CSP while running tests (webdriver) (Content-Security-policy)) 我找不到任何解决方案,只能设置一个过滤标头的代理。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

我认为最好的方法是使用same question for Chrome 中的解决方案,只是将Chrome扩展程序转换为Microsoft Edge。

  1. 将链接的问题关注到您的意思。
  2. 使用this tool
  3. 将Chrome扩展程序转换为Edge扩展程序
  4. 使用 extensionPath 选项来加载扩展程序。