Indeed it appears as though the selenium 3.5.1 release has fouled up some older dependencies that may not have been specific enough, as my 3.3.0 selenium is “upgrading” to 3.5.1:
+--- org.seleniumhq.selenium:selenium-java:3.3.0
| +--- org.seleniumhq.selenium:selenium-chrome-driver:3.3.0
| | \--- org.seleniumhq.selenium:selenium-remote-driver:3.3.0 -> 3.5.1
| | +--- org.seleniumhq.selenium:selenium-api:3.5.1
| | +--- cglib:cglib-nodep:3.2.4
| | +--- org.apache.commons:commons-exec:1.3
| | +--- commons-codec:commons-codec:1.10
| | +--- commons-logging:commons-logging:1.2
| | +--- com.google.code.gson:gson:2.8.0 -> 2.8.1
| | +--- com.google.guava:guava:23.0
Looks like the issue is in the selenium htmlunit dependency that’s grabbing 3.5.1 causing everythingelse to be upgraded
| \--- org.seleniumhq.selenium:htmlunit-driver:2.24
| +--- org.seleniumhq.selenium:selenium-support:[2.53.0,4.0.0) -> 3.5.1
| | +--- org.seleniumhq.selenium:selenium-api:3.5.1
| | +--- org.seleniumhq.selenium:selenium-remote-driver:3.5.1 (*)
To fix this, force seleniumjava to a version, then ignore guava from it (gradle example):
// Selenium 3.5.1 released, caused older selenium issues, so need to force guava to 21.0 and other
// sub-modules where we want them. thanks htmlunit-driver!
// Uncomment this line, and remove bottom section if things get fixed or you upgrade
// all the way to selenium 3.5.1... but appium doesn't play well with it yet
// compile("org.seleniumhq.selenium:selenium-java:3.3.0")
// All this can go away if htmlunit-driver is fixed for older selenium versions
compile("io.appium:java-client:5.0.0-BETA9") {
exclude group: 'org.seleniumhq.selenium', module: 'selenium-java'
}
compile("org.seleniumhq.selenium:selenium-java:3.3.0") {
exclude group: 'org.seleniumhq.selenium', module: 'htmlunit-driver'
}
// If you need parts of htmlunit-driver dependencies, uncomment this
// compile("org.seleniumhq.selenium:htmlunit-driver:2.26") {
// exclude group: 'org.seleniumhq.selenium', module: 'selenium-api'
// exclude group: 'org.seleniumhq.selenium', module: 'selenium-support'
// }
compile group: 'org.seleniumhq.selenium', name: 'selenium-support', version: "3.3.0"
// Make sure guava is 21.0... others don't play well
compile group: 'com.google.guava', name: 'guava', version: '21.0'
// If you need codec stuff from newer commons-codec
compile group: 'commons-codec', name: 'commons-codec', version: '1.10'