How can I intercept SSL requests with BrowserMob proxy

给你一囗甜甜゛ 提交于 2019-12-13 02:35:30

问题


I am using BrowserMob proxy 2.0-beta-8 in a test automation project with Selenium. The page I'm testing against is using https and I need to rewrite the user agent header. For plain http requests everything works fine - the request interceptor is called and I can rewrite the header. However, for https requests the interceptor is not called at all.

Does BrowserMob currently not support intercepting https requests or am I missing something here?


回答1:


You did not mention what browser are you using:

1) If you are using Firefox/Chrome, Selenium2 and BrowserMob >=2.0-beta8 then everything should work out of the box

2) If you are using other browser, check how to install browser CA certificate



来源:https://stackoverflow.com/questions/19682868/how-can-i-intercept-ssl-requests-with-browsermob-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!