Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (7k points)

I want to use Appium with Android studio. Especially how to use the Android Driver.

I have read many docs and instructions on how it is supposed to be done. All of which seem to change drastically between releases.

Many recent sites talk about using the Android driver that comes with the Appium rather than the WebDriver. But that means you have to import:

import io.appium.java_client.AppiumDriver

But despite having included all that I can find in sites and here the standard includes don’t seen to give access to the driver’s library.

Meaning that I am unable to import anything from the io.* path.

dependencies {

    implementation 'org.seleniumhq.selenium:selenium-java:3.141.59'

    implementation 'org.seleniumhq.selenium:selenium-support:3.141.59'

    implementation 'org.seleniumhq.selenium:selenium-server:3.141.59'

}

What I think that I need to do is the following:

var driver: WebDriver = AndroidDriver(URL("http://127.0.0.1:4723/wd/hub"), capabilities)

1 Answer

0 votes
by (13.1k points)

Remove all the selenium dependencies from the project and only use io.appium/java-client dependency

compile group: 'io.appium', name: 'java-client', version: '7.3.0'

Java-client already has selenium dependencies.

Want to learn Java? Check out Core Java certification from Intellipaat.

Related questions

0 votes
1 answer
asked Oct 31, 2019 in Java by Anvi (10.2k points)
0 votes
1 answer

Browse Categories

...