web-dev-qa-db-ja.com

SessionNotCreatedException:セッションが作成されていません:このバージョンのChromeDriverは、Selenium ChromeDriverを使用したChromeバージョン77のみをサポートしています

ChromeDriver 77.0.3865.10を使用しています

Google Chromeバージョン76.0.3809.100(公式ビルド)(64ビット)

_C:\WINDOWS\system32>Java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)
_

Eclipse IDE for Java開発者バージョン:2019-06 (4.12.0)

ウインドウズ10

新しいOSをインストールするためにウィンドウを再インストールしてみましたが、それでも問題は解決しませんでした。

コードトライアル:

_import org.openqa.Selenium.WebDriver;
import org.openqa.Selenium.chrome.ChromeDriver;

public class One {

    public static void main(String[] args) {

        System.setProperty("webdriver.chrome.driver", "C:\\Work\\chromedriver_win32\\chromedriver.exe");
        WebDriver Driver=new ChromeDriver();
        Driver.get("http://www.yahoo.com");
    }
}
_

エラー:

_Starting ChromeDriver 77.0.3865.10 (bc3579f611bbc73331171afe020ec7a45e6ccc55-refs/branch-heads/3865@{#93}) on port 32932
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Exception in thread "main" 
org.openqa.Selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 77
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: Host: 'LAPTOP-P9CFNEOV', ip: '172.20.10.12', os.name: 'Windows 10', os.Arch: 'AMD64', os.version: '10.0', Java.version: '1.8.0_222'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
Ordinal0 [0x0046EBD3+1502163]
Ordinal0 [0x003EF781+980865]
Ordinal0 [0x0037763F+489023]
Ordinal0 [0x0030F2F4+62196]
Ordinal0 [0x0030BCDA+48346]
Ordinal0 [0x003297E0+169952]
Ordinal0 [0x0032940D+168973]
Ordinal0 [0x003278EB+162027]
Ordinal0 [0x00310AC7+68295]
Ordinal0 [0x00311B40+72512]
Ordinal0 [0x00311AD9+72409]
Ordinal0 [0x00408FE7+1085415]
GetHandleVerifier [0x0050D8AD+503293]
GetHandleVerifier [0x0050D640+502672]
GetHandleVerifier [0x0051471C+531564]
GetHandleVerifier [0x0050E0BA+505354]
Ordinal0 [0x004006B6+1050294]
Ordinal0 [0x0040052F+1049903]
Ordinal0 [0x0040B04B+1093707]
Ordinal0 [0x0040B1B3+1094067]
Ordinal0 [0x0040A145+1089861]
BaseThreadInitThunk [0x75988494+36]
RtlAreBitsSet [0x775641C8+136]
RtlAreBitsSet [0x77564198+88]

at Sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at Sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.Java:62)
at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.Java:45)
at Java.lang.reflect.Constructor.newInstance(Constructor.Java:423)
at org.openqa.Selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.Java:62)
at org.openqa.Selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.Java:30)
at org.openqa.Selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.Java:126)
at Java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.Java:193)
at Java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.Java:958)
at Java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.Java:126)
at Java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.Java:499)
at Java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.Java:486)
at Java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.Java:472)
at Java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.Java:152)
at Java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.Java:234)
at Java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.Java:531)
at org.openqa.Selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.Java:128)
at org.openqa.Selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.Java:74)
at org.openqa.Selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.Java:136)
at org.openqa.Selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.Java:83)
at org.openqa.Selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.Java:552)
at org.openqa.Selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.Java:213)
at org.openqa.Selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.Java:131)
at org.openqa.Selenium.chrome.ChromeDriver.<init>(ChromeDriver.Java:181)
at org.openqa.Selenium.chrome.ChromeDriver.<init>(ChromeDriver.Java:168)
at org.openqa.Selenium.chrome.ChromeDriver.<init>(ChromeDriver.Java:123)
at One.main(One.Java:10)
_
1
YSam Kabir

ダウンロードする必要がありますChromeドライバーこのバージョンへのリンクはこちらですバージョンリンクですクリックしてダウンロードできます https://chromedriver.storage.googleapis.com/index.html?path = 77.0.3865.10 /

0
Hamza Lachi