user3815186
user3815186

Reputation: 1

while using real Android device I got "Selendroid server on the device didn't came up"

  1. I tried to automated android device Galaxy S4 (v4.2.2).
  2. I started with the "getting started" as appear in the selendroid.io web
  3. I used selendroid-standalone-0.10.0-with-dependencies.jar
  4. tried to automate the app tha the web provide as training : selendroid-test-app0.10.0.ap
  5. java jdk 1.8
  6. ADT was installed
  7. by typing "adb devices " - I see the android device as well
  8. the selendroid-standalone-0.10.0-with-dependencies.jar and the app were placed in teh same folder 6.. I run the command : java -jar selendroid-standalone-0.10.0-with-dependencies.jar -app selendroid-test-app-0.10.0.apk" -- and 4444 port was opened as needed

Now , when I tried to run the follwing code :

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import io.selendroid.SelendroidCapabilities;
import io.selendroid.SelendroidDriver;

public class login {

    public static void main(String[] args) throws Exception {

        SelendroidCapabilities capa = new SelendroidCapabilities("io.selendroid.testapp:0.10.0");

        WebDriver driver = new SelendroidDriver(capa);      

    }

}

and I got the following exceptions :

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Selendroid server on the device didn't came up after 20sec:

Upvotes: 0

Views: 2875

Answers (2)

Shree Harsha S
Shree Harsha S

Reputation: 685

Even I was getting this error.

Fix :

Don't install the app under test by yourself on the device/emulator.

Let selendroid resign and install the apk by itself.

Upvotes: 1

user1740966
user1740966

Reputation: 19

  1. stop the selendroid server from command prompt (press ctrl+C) and uninstall the apk in your device if the apk is already installed.

  2. Now install the resigned apk (which is already created when you run the selendroid server previously) in your device

  3. Now start the selendroid server from your command promt like "java -jar -aut <.apk>"

  4. Now, run your test. It will run without any error

Upvotes: 2

Related Questions