我正在尝试使用selenium和chromedriver来测试Web应用程序。应用程序使用ssl,我需要使用ZAP(与安全相关的代理)。 我可以通过zap而不是ssl流量获得定期的非ssl流量。 我使用的是oraclelinux 7.4,python 2.7.5,selenium 3.12和chromedriver 2.37.544315。
测试python脚本如下:
from selenium import webdriver
PROXY = "127.0.0.1:8090"
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=http://%s' % PROXY)
chrome = webdriver.Chrome(chrome_options=chrome_options)
chrome.get("http://example.com") # this works the proxy loggs the request.
chrome.get("https://example.com") # this does not work, the proxy does not log the request
chrome.quit()
如何配置chrome以将我的代理用于ssl流量?