1
尝试访问测试门户时,我在使用selenium.start("captureNetworkTraffic=true");
模式时遇到以下问题。Selenium SSL握手问题
HTTP错误:400
Could not proxy https://myurl.com
java.lang.RuntimeException: Couldn't establish SSL handshake. Try using trustAllSSLCertificates.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
RequestURI=/auth/login
注意,这种情况只有在captureNetworkTrafficMode。一个简单的selenium.start();
工作没有任何问题。
这里的接入码 -
RemoteControlConfiguration settings = new RemoteControlConfiguration();
File f = new File("C:\\selenium-profile");
BrowserConfigurationOptions bco = new BrowserConfigurationOptions();
bco.setCommandLineFlags("-trustAllSSLCertificates");
bco.setCommandLineFlags("-disable-web-security");
bco.setCommandLineFlags("-avoidProxy");
settings.setFirefoxProfileTemplate(f);
settings.setReuseBrowserSessions(true);
settings.setSingleWindow(true);
SeleniumServer seleniumserver=new SeleniumServer(settings);
seleniumserver.boot();
seleniumserver.start();
selenium = new DefaultSelenium("localhost",4444,"*chrome","http://myurl.com") {
public void open(String url) {
commandProcessor.doCommand("open", new String[] {url,"true"});
}
};
selenium.start("captureNetworkTraffic=true");
selenium.open("/");
这个问题似乎已经被殴打致死,但我仍然还没有碰到过一个令人信服的解决方案来......大多数建议的自定义配置文件的FF的创建,但这不起作用。
我收到同样的问题在PHP。我不知道在PHP中是否有任何RemoteControlConfiguration类。请帮助,如果你有任何想法:) – lAH2iV 2011-09-08 08:55:52