Selenium Core で https にアクセスすると HTTP ERROR: 400 になる。(未解決)
Selenium Core から https のサイトにアクセスするとエラーになる。(未解決)
■エラー内容
TestRunnerで起動されたIE画面上に出るエラー
HTTP ERROR: 400
・ -log オプションの結果
(省略) 10:53:12.687 DEBUG [12] org.openqa.selenium.server.ProxyHandler - Could not proxy URLエンコードされたアクセス先URL javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.setNewClient(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.setNewClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source) at org.openqa.selenium.server.ProxyHandler.proxyPlainTextRequest(ProxyHandler.java:374) at org.openqa.selenium.server.ProxyHandler.handle(ProxyHandler.java:250) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:816) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 26 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 32 more 10:53:12.703 DEBUG [12] org.mortbay.util.ByteBufferOutputStream - Reserve: 562>512 10:53:12.703 DEBUG [12] org.mortbay.util.ByteBufferOutputStream - Shift reserve: 2362+562<8184 10:53:12.703 DEBUG [12] org.mortbay.http.HttpContext - Handled by org.openqa.selenium.server.ProxyHandler in HttpContext[/,/] 10:53:12.703 DEBUG [12] org.mortbay.http.HttpConnection - RESPONSE: HTTP/1.1 400 Could+not+proxy+URLエンコードされたアクセス先URL Date: Fri, 07 Dec 2007 01:53:12 GMT Server: Jetty/5.1.x (Windows XP/5.1 x86 java/1.6.0_03 Content-Type: text/html Content-Length: 1850 Connection: keep-alive (省略)
■試した改善方法
1.selenium バージョンアップ(0.8.3 -> 0.9.2)
http://release.openqa.org/selenium-remote-control/0.9.2/selenium-remote-control-0.9.2-dist.zip
解決せず。
2.ブラウザ指定を変更
id:otao さんの記事を発見。
http://d.hatena.ne.jp/otao/20070206
ー set BROWSER="*iexplore" + set BROWSER="*iehta"
TestRunnerのエラー内容が変わった。
IEでスクリプトエラーがポップアップされた ライン: 1075 文字: 9 エラー: 書き込みできません。 コード: 0 URL: file://C\DOCUME~1\ユーザー名\LOCALS~1 \Temp\customProfileDir881171\core\TestRunner.hta このページのスクリプトを実行し続けますか? はい(Y) いいえ(N)
はい、いいえ。どちらを押下しても動かず。。
うーむ。
参照: http://www.nabble.com/Https-and-Selenium---Need-help-pls.-t4400529.html