Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use in android studio #175

Open
Diolor opened this issue Mar 23, 2015 · 1 comment
Open

Use in android studio #175

Diolor opened this issue Mar 23, 2015 · 1 comment

Comments

@Diolor
Copy link

Diolor commented Mar 23, 2015

What I am trying to do is to use it directly as Robolectric unit tests in Android Studio. The problem comes when I create a new AndroidDriver():

new AndroidDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);

The selenium driver uses the apache-http client which in Android is not complete so there are missing classes from the preloaded one. My next step is to use Jarjar to stitch together a new version of http client in the Android SDK jar.

Not sure if it worths the pain, but I would like to discuss if this sounds like a good idea (fake the UI tests as unit tests)?

A different option is of course to create a different project only to test the apk.

Fyi piece from my .gradle:

testApt 'com.squareup.dagger:dagger-compiler:1.2.2'
testCompile 'com.squareup.dagger:dagger:1.2.2'
testCompile ('io.appium:java-client:2.2.0'){
    exclude module: 'guava'
    exclude module: 'httpmime'
    exclude module: 'gson'
}
@Jonahss
Copy link
Member

Jonahss commented Mar 24, 2015

Hmm. Yeah it would be nice if users could run their tests directly from Android Studio. Didn't realize they weren't able to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants