SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.53k stars 8.16k forks source link

Selenium 4.0.0-alpha-5: cannot access org.openqa.selenium.virtualauthenticator.HasVirtualAuthenticator #8278

Closed Naumansh closed 4 years ago

Naumansh commented 4 years ago

🐛 Bug Report

Once upgrading to Selenium 4.0.0-alpha-5, I am seeing the exception of class not found. It is a compile time error.

There is no issue while working with 3.141.59

Dependencies used:

        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>7.3.0</version>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.0.0-alpha-5</version>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-server</artifactId>
            <version>4.0.0-alpha-2</version>
        </dependency>

Environment

OS: OSX Browser: Not required as compile time error Browser Driver version: Language Bindings version: Java 4.0.0-alpha-5 Selenium Grid version (if applicable): 4.0.0-alpha-2 Java: 11

barancev commented 4 years ago

Run mvn dependency:tree and check if you have multiple versions of selenium libraries in classpath at once.

Naumansh commented 4 years ago

@barancev

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ blaze-operations ---
[INFO] com.testing:blaze-operations:jar:1.0.0
[INFO] +- io.github.bonigarcia:webdrivermanager:jar:3.8.1:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] |  +- commons-io:commons-io:jar:2.6:compile
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.8.1:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  +- org.rauschig:jarchivelib:jar:1.0.0:compile
[INFO] |  |  \- org.apache.commons:commons-compress:jar:1.18:compile
[INFO] |  \- org.jsoup:jsoup:jar:1.11.3:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] +- io.appium:java-client:jar:7.3.0:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-support:jar:3.141.59:compile
[INFO] |  |  +- net.bytebuddy:byte-buddy:jar:1.8.15:compile
[INFO] |  |  +- org.apache.commons:commons-exec:jar:1.3:compile
[INFO] |  |  +- com.google.guava:guava:jar:25.0-jre:compile
[INFO] |  |  |  +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] |  |  |  +- org.checkerframework:checker-compat-qual:jar:2.0.0:compile
[INFO] |  |  |  +- com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
[INFO] |  |  |  +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] |  |  |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] |  |  +- com.squareup.okhttp3:okhttp:jar:3.11.0:compile
[INFO] |  |  \- com.squareup.okio:okio:jar:1.14.0:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-api:jar:3.141.59:compile
[INFO] |  +- cglib:cglib:jar:3.2.12:compile
[INFO] |  |  \- org.ow2.asm:asm:jar:7.1:compile
[INFO] |  +- commons-validator:commons-validator:jar:1.6:compile
[INFO] |  |  +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] |  |  +- commons-digester:commons-digester:jar:1.8.1:compile
[INFO] |  |  \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |  +- org.springframework:spring-context:jar:5.1.8.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-aop:jar:5.1.8.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-beans:jar:5.1.8.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-core:jar:5.1.8.RELEASE:compile
[INFO] |  |  |  \- org.springframework:spring-jcl:jar:5.1.8.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-expression:jar:5.1.8.RELEASE:compile
[INFO] |  \- org.aspectj:aspectjweaver:jar:1.9.4:compile
[INFO] +- io.cucumber:cucumber-java:jar:5.4.2:compile
[INFO] |  +- io.cucumber:cucumber-core:jar:5.4.2:compile
[INFO] |  |  +- io.cucumber:cucumber-gherkin:jar:5.4.2:compile
[INFO] |  |  +- io.cucumber:cucumber-gherkin-vintage:jar:5.4.2:compile
[INFO] |  |  +- io.cucumber:cucumber-expressions:jar:8.3.1:compile
[INFO] |  |  +- io.cucumber:datatable:jar:3.3.0:compile
[INFO] |  |  +- io.cucumber:cucumber-plugin:jar:5.4.2:compile
[INFO] |  |  \- io.cucumber:docstring:jar:5.4.2:compile
[INFO] |  \- org.apiguardian:apiguardian-api:jar:1.1.0:compile
[INFO] +- io.cucumber:cucumber-junit:jar:5.4.2:compile
[INFO] +- junit:junit:jar:4.13-beta-3:compile
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- org.assertj:assertj-core:jar:3.11.1:compile
[INFO] +- org.apache.maven.surefire:surefire-junit4:jar:3.0.0-M3:compile
[INFO] |  +- org.apache.maven.surefire:common-junit4:jar:3.0.0-M3:compile
[INFO] |  |  +- org.apache.maven.surefire:common-junit3:jar:3.0.0-M3:compile
[INFO] |  |  \- org.apache.maven.surefire:common-java5:jar:3.0.0-M3:compile
[INFO] |  \- org.apache.maven.surefire:surefire-api:jar:3.0.0-M3:compile
[INFO] |     \- org.apache.maven.surefire:surefire-logger-api:jar:3.0.0-M3:compile
[INFO] +- com.trivago.rta:cucable-plugin:jar:1.7.0:compile
[INFO] |  +- org.apache.maven:maven-plugin-api:jar:3.6.3:compile
[INFO] |  |  +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.4:compile
[INFO] |  |  |  +- javax.enterprise:cdi-api:jar:1.0:compile
[INFO] |  |  |  |  +- javax.annotation:jsr250-api:jar:1.0:compile
[INFO] |  |  |  |  \- javax.inject:javax.inject:jar:1:compile
[INFO] |  |  |  \- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.4:compile
[INFO] |  |  \- org.codehaus.plexus:plexus-classworlds:jar:2.6.0:compile
[INFO] |  +- io.cucumber:gherkin:jar:5.2.0:compile
[INFO] |  |  \- io.cucumber:gherkin-jvm-deps:jar:1.0.6:compile
[INFO] |  \- io.cucumber:tag-expressions:jar:2.0.4:compile
[INFO] +- io.cucumber:cucumber-picocontainer:jar:5.4.2:compile
[INFO] |  \- org.picocontainer:picocontainer:jar:2.15:compile
[INFO] +- org.slf4j:slf4j-nop:jar:1.7.25:compile
[INFO] +- org.seleniumhq.selenium:selenium-java:jar:4.0.0-alpha-5:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-chrome-driver:jar:4.0.0-alpha-5:compile
[INFO] |  |  +- com.google.auto.service:auto-service-annotations:jar:1.0-rc6:compile
[INFO] |  |  +- com.google.auto.service:auto-service:jar:1.0-rc6:compile
[INFO] |  |  |  \- com.google.auto:auto-common:jar:0.10:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-chromium-driver:jar:4.0.0-alpha-5:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-devtools:jar:4.0.0-alpha-5:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-http:jar:4.0.0-alpha-5:compile
[INFO] |  |  \- org.seleniumhq.selenium:selenium-json:jar:4.0.0-alpha-5:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-edge-driver:jar:4.0.0-alpha-5:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-edgehtml-driver:jar:4.0.0-alpha-5:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-firefox-driver:jar:4.0.0-alpha-5:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-firefox-xpi-driver:jar:4.0.0-alpha-5:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-ie-driver:jar:4.0.0-alpha-5:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-opera-driver:jar:4.0.0-alpha-5:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-remote-driver:jar:4.0.0-alpha-5:compile
[INFO] |  |  +- com.typesafe.netty:netty-reactive-streams:jar:2.0.4:compile
[INFO] |  |  |  +- io.netty:netty-handler:jar:4.1.43.Final:compile
[INFO] |  |  |  \- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] |  |  +- io.netty:netty-buffer:jar:4.1.47.Final:compile
[INFO] |  |  |  \- io.netty:netty-common:jar:4.1.47.Final:compile
[INFO] |  |  +- io.netty:netty-codec-http:jar:4.1.47.Final:compile
[INFO] |  |  |  \- io.netty:netty-codec:jar:4.1.47.Final:compile
[INFO] |  |  +- io.netty:netty-transport-native-epoll:jar:4.1.47.Final:compile
[INFO] |  |  +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.47.Final:compile
[INFO] |  |  +- io.netty:netty-transport-native-kqueue:jar:4.1.47.Final:compile
[INFO] |  |  +- io.netty:netty-transport-native-kqueue:jar:osx-x86_64:4.1.47.Final:compile
[INFO] |  |  +- io.netty:netty-transport-native-unix-common:jar:4.1.47.Final:compile
[INFO] |  |  +- io.netty:netty-transport:jar:4.1.47.Final:compile
[INFO] |  |  |  \- io.netty:netty-resolver:jar:4.1.47.Final:compile
[INFO] |  |  +- io.opentelemetry:opentelemetry-api:jar:0.2.0:compile
[INFO] |  |  |  \- io.grpc:grpc-context:jar:1.24.0:compile
[INFO] |  |  \- org.asynchttpclient:async-http-client:jar:2.11.0:compile
[INFO] |  |     +- org.asynchttpclient:async-http-client-netty-utils:jar:2.11.0:compile
[INFO] |  |     +- io.netty:netty-codec-socks:jar:4.1.46.Final:compile
[INFO] |  |     +- io.netty:netty-handler-proxy:jar:4.1.46.Final:compile
[INFO] |  |     \- com.sun.activation:javax.activation:jar:1.2.0:compile
[INFO] |  \- org.seleniumhq.selenium:selenium-safari-driver:jar:4.0.0-alpha-5:compile
[INFO] +- org.seleniumhq.selenium:selenium-server:jar:4.0.0-alpha-2:compile
[INFO] |  +- org.seleniumhq.selenium:grid:jar:4.0.0-alpha-2:compile
[INFO] |  |  +- com.beust:jcommander:jar:1.72:compile
[INFO] |  |  +- org.seleniumhq.selenium:jetty-repacked:jar:9.4.12.v20180830.1:compile
[INFO] |  |  |  \- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  |  \- org.zeromq:jeromq:jar:0.5.1:compile
[INFO] |  |     \- eu.neilalexander:jnacl:jar:1.0.0:compile
[INFO] |  +- net.jcip:jcip-annotations:jar:1.0:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.24:compile
[INFO] +- org.apache.maven:maven-model:jar:3.3.9:compile
[INFO] |  \- org.codehaus.plexus:plexus-utils:jar:3.0.22:compile
[INFO] +- org.apache.poi:poi:jar:3.16:compile
[INFO] |  +- commons-codec:commons-codec:jar:1.10:compile
[INFO] |  \- org.apache.commons:commons-collections4:jar:4.1:compile
[INFO] +- org.apache.poi:poi-ooxml:jar:3.16:compile
[INFO] |  +- org.apache.poi:poi-ooxml-schemas:jar:3.16:compile
[INFO] |  |  \- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile
[INFO] |  |     \- stax:stax-api:jar:1.0.1:compile
[INFO] |  \- com.github.virtuald:curvesapi:jar:1.04:compile
[INFO] +- io.rest-assured:rest-assured:jar:4.1.1:compile
[INFO] |  +- org.codehaus.groovy:groovy:jar:2.5.6:compile
[INFO] |  +- org.codehaus.groovy:groovy-xml:jar:2.5.6:compile
[INFO] |  +- org.apache.httpcomponents:httpmime:jar:4.5.3:compile
[INFO] |  +- org.hamcrest:hamcrest:jar:2.1:compile
[INFO] |  +- org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:compile
[INFO] |  +- io.rest-assured:json-path:jar:4.1.1:compile
[INFO] |  |  +- org.codehaus.groovy:groovy-json:jar:2.5.6:compile
[INFO] |  |  \- io.rest-assured:rest-assured-common:jar:4.1.1:compile
[INFO] |  \- io.rest-assured:xml-path:jar:4.1.1:compile
[INFO] |     +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |     |  \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |     +- com.sun.xml.bind:jaxb-osgi:jar:2.3.0.1:compile
[INFO] |     \- org.apache.sling:org.apache.sling.javax.activation:jar:0.1.0:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.1:compile
[INFO] +- ru.yandex.qatools.ashot:ashot:jar:1.5.4:compile
[INFO] +- com.itextpdf:itextpdf:jar:5.5.13:compile
[INFO] +- org.apache.maven.shared:maven-invoker:jar:3.0.1:compile
[INFO] |  +- org.apache.maven.shared:maven-shared-utils:jar:3.2.1:compile
[INFO] |  \- org.codehaus.plexus:plexus-component-annotations:jar:1.7.1:compile
[INFO] +- com.pojosontheweb:monte-repack:jar:1.0.1:compile
[INFO] |  +- javax.media.jai:com.springsource.javax.media.jai.core:jar:1.1.3:compile
[INFO] |  |  \- javax.media.jai:com.springsource.javax.media.jai.codec:jar:1.1.3:compile
[INFO] |  \- javax.media:jmf:jar:2.1.1e:compile
[INFO] +- com.paulhammant:ngwebdriver:jar:1.1.4:compile
[INFO] +- org.apache.maven.plugins:maven-javadoc-plugin:maven-plugin:3.1.1:compile
[INFO] |  +- org.apache.maven:maven-core:jar:3.0:compile
[INFO] |  |  +- org.apache.maven:maven-settings-builder:jar:3.0:compile
[INFO] |  |  +- org.apache.maven:maven-repository-metadata:jar:3.0:compile
[INFO] |  |  +- org.apache.maven:maven-model-builder:jar:3.0:compile
[INFO] |  |  +- org.apache.maven:maven-aether-provider:jar:3.0:runtime
[INFO] |  |  +- org.sonatype.aether:aether-impl:jar:1.7:compile
[INFO] |  |  |  \- org.sonatype.aether:aether-spi:jar:1.7:compile
[INFO] |  |  +- org.sonatype.aether:aether-api:jar:1.7:compile
[INFO] |  |  +- org.sonatype.aether:aether-util:jar:1.7:compile
[INFO] |  |  +- org.sonatype.sisu:sisu-inject-plexus:jar:1.4.2:compile
[INFO] |  |  |  \- org.sonatype.sisu:sisu-inject-bean:jar:1.4.2:compile
[INFO] |  |  |     \- org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7:compile
[INFO] |  |  +- org.codehaus.plexus:plexus-interpolation:jar:1.14:compile
[INFO] |  |  \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
[INFO] |  |     \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[INFO] |  +- org.apache.maven:maven-settings:jar:3.0:compile
[INFO] |  +- org.apache.maven:maven-artifact:jar:3.0:compile
[INFO] |  +- org.apache.maven.reporting:maven-reporting-api:jar:3.0:compile
[INFO] |  +- org.apache.maven:maven-archiver:jar:3.2.0:compile
[INFO] |  +- org.apache.maven.shared:maven-common-artifact-filters:jar:3.0.0:compile
[INFO] |  +- org.apache.maven.shared:maven-artifact-transfer:jar:0.10.1:compile
[INFO] |  +- org.apache.maven.doxia:doxia-sink-api:jar:1.7:compile
[INFO] |  |  \- org.apache.maven.doxia:doxia-logging-api:jar:1.7:compile
[INFO] |  +- org.apache.maven.doxia:doxia-site-renderer:jar:1.7.4:compile
[INFO] |  |  +- org.apache.maven.doxia:doxia-core:jar:1.7:compile
[INFO] |  |  |  \- xmlunit:xmlunit:jar:1.5:compile
[INFO] |  |  +- org.apache.maven.doxia:doxia-decoration-model:jar:1.7.4:compile
[INFO] |  |  +- org.apache.maven.doxia:doxia-skin-model:jar:1.7.4:compile
[INFO] |  |  +- org.apache.maven.doxia:doxia-module-xhtml:jar:1.7:compile
[INFO] |  |  +- org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7:compile
[INFO] |  |  +- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-30:compile
[INFO] |  |  +- org.codehaus.plexus:plexus-velocity:jar:1.2:compile
[INFO] |  |  +- org.apache.velocity:velocity:jar:1.7:compile
[INFO] |  |  +- org.apache.velocity:velocity-tools:jar:2.0:compile
[INFO] |  |  |  +- commons-chain:commons-chain:jar:1.1:compile
[INFO] |  |  |  +- dom4j:dom4j:jar:1.1:compile
[INFO] |  |  |  +- oro:oro:jar:2.0.8:compile
[INFO] |  |  |  +- sslext:sslext:jar:1.2-0:compile
[INFO] |  |  |  +- org.apache.struts:struts-core:jar:1.3.8:compile
[INFO] |  |  |  |  \- antlr:antlr:jar:2.7.2:compile
[INFO] |  |  |  +- org.apache.struts:struts-taglib:jar:1.3.8:compile
[INFO] |  |  |  \- org.apache.struts:struts-tiles:jar:1.3.8:compile
[INFO] |  |  \- commons-lang:commons-lang:jar:2.4:compile
[INFO] |  +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile
[INFO] |  +- com.thoughtworks.qdox:qdox:jar:2.0-M10:compile
[INFO] |  +- org.codehaus.plexus:plexus-java:jar:1.0.3:compile
[INFO] |  +- org.codehaus.plexus:plexus-archiver:jar:3.6.0:compile
[INFO] |  |  +- org.iq80.snappy:snappy:jar:0.4:compile
[INFO] |  |  \- org.tukaani:xz:jar:1.8:runtime
[INFO] |  +- org.codehaus.plexus:plexus-io:jar:3.1.1:compile
[INFO] |  \- org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-6:compile
[INFO] +- javax.mail:javax.mail-api:jar:1.5.5:compile
[INFO] +- com.sun.mail:smtp:jar:1.6.0:compile
[INFO] +- com.sun.mail:javax.mail:jar:1.6.0:compile
[INFO] |  \- javax.activation:activation:jar:1.1:compile
[INFO] +- org.codehaus.sonar:sonar-maven-plugin:jar:5.1:compile
[INFO] \- com.fasterxml.jackson.core:jackson-databind:jar:2.10.2:compile
[INFO]    +- com.fasterxml.jackson.core:jackson-annotations:jar:2.10.2:compile
[INFO]    \- com.fasterxml.jackson.core:jackson-core:jar:2.10.2:compile
barancev commented 4 years ago

That's exactly what I meant to say -- you have multiple versions of selenium libraries in classpath at once.

Naumansh commented 4 years ago

@barancev i cannot get it. i am only keeping one dependency of selenium-java. Is it about the appium which might be pulling some other version of selenium ? If that is so even then what could be the remedy ? Appreciate your help.

barancev commented 4 years ago

Appium adds an older one.

ramya913 commented 4 years ago

@barancev is the issue which you have mentioned above is solved?if yes, may i know-what are the changes that made it work

ramya913 commented 4 years ago

Dependencies Used:

io.appium java-client 7.0.0 junit junit 4.12 test org.testng testng 6.10 org.seleniumhq.selenium selenium-java 4.0.0-alpha-4 org.apache.poi poi 3.10-FINAL jar log4j log4j 1.2.17 ru.yandex.qatools.allure allure-maven-plugin 2.6 ru.yandex.qatools.allure allure-testng-adaptor ${allure.version}