我正在尝试简单地导航到google页面:
String url = "https://www.google.com";
Selenide.open(url);抛出的确切异常是:
java.util.stream.Collector com.google.common.collect.ImmutableList.toImmutableList()'
java.lang.NoSuchMethodError: 'java.util.stream.Collector com.google.common.collect.ImmutableList.toImmutableList()'
at org.openqa.selenium.chrome.ChromeOptions.asMap(ChromeOptions.java:292)
at org.openqa.selenium.MutableCapabilities.merge(MutableCapabilities.java:73)
at com.codeborne.selenide.webdriver.MergeableCapabilities.<init>(MergeableCapabilities.java:19)
at ...我使用Chrome 86.0.4240.111 (64位)和硒化物5.15.1
发布于 2020-10-29 20:43:05
重点是硒化物与test-ng不兼容,至少与gradle中提到的这个版本不兼容
testCompile group: 'org.testng', name: 'testng', version: '7.3.0'
compile group: 'com.codeborne', name: 'selenide', version: '5.15.1'删除test-ng解决了这个问题
https://stackoverflow.com/questions/64568218
复制相似问题