← 输入框|github.com|刷新
Skip to content

Issue : NoClassDefFoundError with selenium/remote/http/W3CHttpCommandCodec #1273

Closed

Description

@77ripdrive

The problem

When I try to use Selenium 4 in my test case, the error java.lang.NoClassDefFoundError occurs: org / openqa / selenium / remote / http / W3CHttpCommandCodec.

Environment

  • Appium app version that exhibits the issue: 1.15.1
    *Appium version : 'io.appium', name: 'java-client', version: '7.3.0'
  • Selenium version : 'selenium-java', version: '4.0.0-alpha-3'
  • Last Selenium version that did not exhibit the issue : 'selenium-java', version: '3.141.59'
  • Desktop OS/version used to run Appium: Win 10
  • Node.js version (unless using Appium.app|exe):
  • Npm or Yarn package manager: Gradle 6.0.1
  • Mobile platform/version under test:Android 8
  • Real device or emulator/simulator:Emulator

Details

When I try to use Selenium 4 in my test case, the error java.lang.NoClassDefFoundError occurs: org / openqa / selenium / remote / http / W3CHttpCommandCodec.
When using earlier dependencies Selenium up to 4 such errors do not occur.
How can this be due to changes in the implementation of Selenium 4?!

Link to Appium logs

https://gist.github.com/77ripdrive/8007368e8e65bebfad8189a6564f2b9d

Code To Reproduce Issue [ Good To Have ]

https://github.com/77ripdrive/Mobile-Emulators

This is a working example with Selenium 3. To reproduce the error, you need to change the version of the dependency in the file build.gradle line 25 :
implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.141.59'
to the dependency version :
implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.0.0-alpha-3'

Activity

  1. valfirst commented on Nov 29, 2019

    @valfirst
    Collaborator

    @77ripdrive here is a dependency compatibility matrix:

    Appium Java client Selenium Java client
    7.3.0 3.141.59
    7.2.0 3.141.59
    7.1.0 4.0.0-alpha-1
    7.0.0 3.141.59

    The version of Selenium Java client was downgraded in 7.2.0: f5470d9. The reason is users complains: https://twitter.com/imalittletester/status/1162297550713622529.

    Moreover Appium Java client is not compatible with Selenium Java client of versions 4.0.0-alpha-2, 4.0.0-alpha-3 because of this change: SeleniumHQ/selenium@96fec3c#diff-fa76272f866d8067bb11a32f27773026

  2. 77ripdrive commented on Dec 2, 2019

    @77ripdrive
    Author

    Thanks. When Appium plans to support new features from Selenium 4.

  3. valfirst commented on Dec 2, 2019

    @valfirst
    Collaborator

    @77ripdrive Selenium 4 is still in alpha, just curious: which particular features from Selenium 4 are you interested in?

  4. 77ripdrive commented on Dec 2, 2019

    @77ripdrive
    Author

    👍 :) I tried to screw Relative Locators , it was interesting to see .....
    type -> toLeftOf() or toRightOf() or above() or below() or near() .

  5. acarvalhomatos commented on May 8, 2020

    @acarvalhomatos

    @valfirst hi there, i need to get selenium 4 alpha 2 working with appium to get edge chromium testing. any plans on new updates?

  6. valfirst commented on May 9, 2020

    @valfirst
    Collaborator

    @acarvalhomatos the alpha selenium java client was reverted in 7.2.0. (https://twitter.com/imalittletester/status/1162297550713622529)

    regarding updates it's better to ask @SrinivasanTarget, @mykola-mokhnach, @KazuCocoa

  7. mykola-mokhnach commented on May 9, 2020

    @mykola-mokhnach
    Contributor

    There are no plans to incorporate alpha versions of selenium into stable java client releases.

  8. blackburn-ian commented on Aug 25, 2021

    @blackburn-ian

    @mykola-mokhnach, @SrinivasanTarget , @KazuCocoa
    Are there any plans to support beta versions of Selenium - perhaps in beta versions of Appium? (there's at least one improvement in 4.0.0-beta-4 that I would like to make use of in my test framework)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions