Hi
Dominik,
I m trying with selendroid framework.It seems there is a big problem where trying to connect the device to the selendroid server continuously getting error.
My application is a hybrid application.
Please check the step i did and let me know if anything wrong in that .
1.After setup i have resigned the app with this command
java -jar selendroid-standalone-0.9.0-with-dependencies.jar -app TestApp.apk
2.Put the Resigned app into the device and then install the app
3.Run the command
i will get status like mentioned below.
{"status":0,"value":{"supportedApps":[{"appId":"io.selendroid.androiddriver:0.9.0","mainActivity":"io.selendroid.androiddriver.WebViewActivity","basePackage":"io.selendroid.androiddriver"},{"appId":"com.siemens.compass:1.3","mainActivity":"com.siemens.compas.Launcher","basePackage":"com.siemens.compass"}],"os":{"arch":"x86","name":"Windows
XP","version":"5.1"},"build":{"browserName":"selendroid","version":"0.9.0"},"supportedDevices":[{"screenSize":"1280x800","model":"Nexus
7","emulator":false,"androidTarget":"ANDROID19"},{"screenSize":"1280x800","model":"Nexus
7","emulator":false,"androidTarget":"ANDROID19"},{"screenSize":"1280x800","model":"Nexus
7","emulator":false,"androidTarget":"ANDROID19"}]}}
Then i have created the test scripts into the Eclips which is mentioned below
package io.selendroid.demo.webui;
import java.util.concurrent.TimeUnit;
import io.selendroid.SelendroidCapabilities;
import io.selendroid.SelendroidDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
public class Test
{
public static void main(String[] args) throws Throwable
{
//SelendroidCapabilities capa = new
SelendroidCapabilities("com.siemens.compassecure:1.0");
SelendroidCapabilities capa = new
SelendroidCapabilities("com.siemens.compass:1.3");
WebDriver driver = new SelendroidDriver(capa);
driver.switchTo().window("WEBVIEW");
Thread.sleep(10000);
System.out.println(driver.getTitle());
Thread.sleep(10000);
driver.manage().timeouts().implicitlyWait(30000, TimeUnit.SECONDS);
driver.findElement(By.id("username")).sendKeys("***");
Thread.sleep(3000);
driver.findElement(By.id("password")).sendKeys("**");
}
}
When trying to run i m getting the below mentioned error
Exception in thread "main" at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
at dalvik.system.NativeStart.main(Native Method)
Details:
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for:
ComponentInfo{io.selendroid.com.siemens.compass/io.selendroid.ServerInstrumentation}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED:
io.selendroid.com.siemens.compass/io.selendroid.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
at dalvik.system.NativeStart.main(Native Method)
... 20 more
Command duration or timeout: 3.16 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'BLRKAPT0586PC', ip: '10.187.161.152', os.name:
'Windows XP', os.arch: 'x86', os.version: '5.1', java.version:
'1.7.0_45'
Driver info: io.selendroid.SelendroidDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
at io.selendroid.SelendroidDriver.<init>(SelendroidDriver.java:61)
at io.selendroid.demo.webui.Test.main(Test.java:26) at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
at dalvik.system.NativeStart.main(Native Method)
Details:
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for:
ComponentInfo{io.selendroid.com.siemens.compass/io.selendroid.ServerInstrumentation}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED:
io.selendroid.com.siemens.compass/io.selendroid.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
at dalvik.system.NativeStart.main(Native Method)
... 20 more
Please help me.
On Wednesday, May 21, 2014 12:01:52 AM UTC+5:30, Dominik Dary wrote: