- PAC代理
代理上网的服务器测试,如果在浏览器上配置代理,会导致selenium报错,可以采用PAC代理方式解决:
编写如下文件,存储城proxy.pac格式
function FindProxyForURL(url, host) {
// our local URLs from the domains below example.com don't need a proxy:
if (shExpMatch(host, "*.example.com"))
{
return "DIRECT";
}
// URLs within this network are accessed through
// port 8080 on fastproxy.example.com:
if (isInNet(host, "10.0.0.0", "255.255.248.0"))
{
return "PROXY 10.228.1.130:8080";
}
// All other requests go through port 8080 of proxy.example.com.
// should that fail to respond, go directly to the WWW:
return "PROXY 10.228.1.130:8080; DIRECT";
}
在intenet选项,局域网-自动配置-使用自动配置脚本
参考
- 浏览器驱动版本对应