0

The code is :

WebDriver driver;

driver = new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

Error I am getting is :

The type org.openqa.selenium.remote.service.DriverService$Builder cannot be resolved. It is indirectly referenced from required .class files

How can I fix this issue? My selenium and appium java client jars are already added in build path->Libraries

drkthng
  • 6,651
  • 7
  • 33
  • 53
Sujay
  • 139
  • 1
  • 9

2 Answers2

0

Seems like you are invoking the android driver incorrectly. Please use the following code to initiate an Android driver.

AppiumDriver driver;
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

You will be needing Selenium server, appium java client jar file in your classpath.

debugger89
  • 2,108
  • 2
  • 14
  • 16
  • Tried all that. Still does not compile. Unresolved compilation problem: The type org.openqa.selenium.remote.service.DriverService$Builder cannot be resolved. It is indirectly referenced from required .class files – Jai Nov 23 '15 at 18:32
  • Can you please post all of your class including the imports – debugger89 Nov 24 '15 at 06:35
  • The docs don't mention this but selenium-remote-driver needs to be included in the pom (dependencies) to get rid of this compilation error. – Jai Nov 25 '15 at 15:06
0

Seems like you are using the older version of Selenium standalone server jar. Import the latest "selenium-server-standalone-2.48.2" to your build path. This would fix your issue.