Reputation: 100
I started the Selendroid server:
java -jar selendroid-standalone-0.17.0-with-dependencies -app Guru99App.apk
The test App Guru99App.apk is signed.
Then I ran this code in Eclipse:
import io.selendroid.standalone.SelendroidConfiguration;
import io.selendroid.standalone.SelendroidLauncher;
import io.selendroid.common.SelendroidCapabilities;
import io.selendroid.client.SelendroidDriver;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;
public class SelendroidTest1 {
private static SelendroidLauncher selendroidServer = null;
private static WebDriver driver = null;
@Test
public void selendroidTest() throws Exception {
System.out.print("Start executing test");
SelendroidConfiguration config = new SelendroidConfiguration();
selendroidServer = new SelendroidLauncher(config);
selendroidServer.launchSelendroid();
DesiredCapabilities caps = SelendroidCapabilities.android();
driver = new SelendroidDriver(caps);
}
@AfterSuite
public void tearDown() {
driver.quit();
}
}
My Smartphone is connected, I checked with 'adb devices' as well, but I keep getting this Exception: 'No devices are found. This can happen if the devices are in use or no device screen matches the required capabilities.'
I also tried starting the server with:
java -jar selendroid-standalone-0.17.0-with-dependencies -aut Guru99App.apk
I assumed that the problem is due to an unsupported version of Android, so I tried this :
SelendroidCapabilities caps = new SelendroidCapabilities("com.guru99app:1.0");
caps.setPlatformVersion(io.selendroid.common.device.DeviceTargetPlatform.ANDROID10);
caps.setEmulator(false);
driver = new SelendroidDriver(caps);
This also did not help. I am using a Motorola Moto one. How can I solve this?
Upvotes: 1
Views: 144