2011-03-03 2 views
1

테스트 포털에 액세스하는 중에 selenium.start("captureNetworkTraffic=true"); 모드를 사용할 때 다음과 같은 문제가 발생합니다.Selenium SSL 핸드 쉐이크 문제

HTTP 오류 :이 만 captureNetworkTrafficMode에서 일어나는 것을 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 

참고. 간단한 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 프로파일의 작성을 권장합니다 그러나 이것은 효과가 없습니다.

settings.setTrustAllSSLCertificates(true); 

답변

0

그것은 모든 SSL 인증서를 신뢰하려면 추가 브라우저 설정에 내려 삶은. 나도 몰라 거기에 어떤 RemoteControlConfiguration 클래스는 PHP 있습니다. 어떤 생각이라도 있으면 도와주세요 :)
+0

내가 PHP에서 동일한 문제가 점점 오전 : – lAH2iV