Skip to content

[appium > android] issue with the selenium version ? #1245

@dqlambor

Description

@dqlambor

The problem

Hi,
I have just setup a new automated testing project using appium on real android device, and get the issue:
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.remote.http.W3CHttpCommandCodec

I'm using Appium desktop v1.13 ( on Windows 7)
Selenium-java-4.0.0 ( i have added all the jars file to the Referenced Lib)
Java-client-7.2

I think the issue happens because this java-client-7.2.0 is not compatible with the Selenium-java-4.0.0.
Please help to take a look and advice the solution as I have googled for hours but could not fix the issue.

Many thanks,

Environment

  • Appium version (or git revision) that exhibits the issue: 1.13
  • Last Appium version that did not exhibit the issue (if applicable): n/a
  • Desktop OS/version used to run Appium: windows 7
  • Node.js version (unless using Appium.app|exe):
  • Npm or Yarn package manager: npm v5.6.0
  • Mobile platform/version under test: Android 7.0 (24)
  • Real device or emulator/simulator: real device
  • Appium CLI or Appium.app|exe: Appium.exe

Details

The test could run the app ( it means the DesiredCapabilities was setup correctly.)
but it stop after 60s with full log as you can see below.
I'm using Appium desktop v1.13
Selenium-java-4.0.0 ( i have added all the jars file to the Referenced Lib)
Java-client-7.2

Link to Appium logs

https://gist.github.com/dqlambor/2c75e4ed009e0733e1008a257f7490ab

##Console log;
https://gist.github.com/dqlambor/f7fcd51be89ebde238b93fa2ec017813

Code To Reproduce Issue [ Good To Have ]

@BeforeSuite
public void beforeMethod() throws MalformedURLException, InterruptedException {
	DesiredCapabilities capa = new DesiredCapabilities();

	capa.setCapability("deviceName", "12160cfb57a10603"); // note 5

	capa.setCapability("platformName", "Android");
	capa.setCapability("platformVersion", "7.0");
	capa.setCapability("noReset", "true");
	capa.setCapability("appPackage", "myapp.packg"); //jut for testing
	capa.setCapability("appActivity", "com.myapp.packg.SplashActivity");

	driver = new AndroidDriver(new URL("http://0.0.0.0:4723/wd/hub"), capa);
	System.out.println("**Setup successfully...");
	driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	stringDate = dateFormat.format(new Date());

	Thread.sleep(2000);
}

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