我要执行我的代码,这是一个我总是每天执行我的测试,但突然这个错误出现了,我几乎没有找到一个解决方案,我不知道是否有可能你可以帮助我,我附上了控制台的响应
Starting ChromeDriver 102.0.5005.27 (df4a85108ffad4dca2c409c52f24df7ec0204b91-refs/branch-heads/5005_22@{#4}) on port 33567
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 102
Current browser version is 101.0.4951.54 with binary path C:Program FilesGoogleChromeApplicationchrome.exe
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-V4H61F7', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.2'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
Ordinal0 [0x003B2733+2434867]
Ordinal0 [0x003407A1+1968033]
Ordinal0 [0x0022C678+837240]
Ordinal0 [0x0024CAC3+969411]
Ordinal0 [0x002486DA+952026]
Ordinal0 [0x00245F91+941969]
Ordinal0 [0x002790B0+1151152]
Ordinal0 [0x00278D0A+1150218]
Ordinal0 [0x00274256+1131094]
Ordinal0 [0x0024E840+976960]
Ordinal0 [0x0024F736+980790]
GetHandleVerifier [0x00623C72+2515426]
GetHandleVerifier [0x0061702F+2463135]
GetHandleVerifier [0x0045522A+620442]
GetHandleVerifier [0x00454016+615814]
Ordinal0 [0x0034707B+1994875]
Ordinal0 [0x0034B938+2013496]
Ordinal0 [0x0034BA25+2013733]
Ordinal0 [0x00354DE1+2051553]
BaseThreadInitThunk [0x7632FA29+25]
RtlGetAppContainerNamedObjectPath [0x77E87A7E+286]
RtlGetAppContainerNamedObjectPath [0x77E87A4E+238]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
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.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:1002)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
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 Selenium.pruebas_activity21.main(CrearOT.java:28)
Process finished with exit code 1
我希望你能帮我做这件事。它没有说任何相关的更改,但似乎我试图做的任何代码都不能再执行了。
这里也一样,突然出现了这个错误。在chrome 105上运行正常,兼容性警告为103。我试过降级Chrome,但没有用。最后,下载105的驱动程序,并将chromedriver.exe放入。/src/test/resources/drivers文件夹中,覆盖旧文件为我解决了