FAILED: testorg.openqa.selenium.WebDriverException: Not yet implemented.
public class TestClassPairingWizardAppium {WebDriver driver;@BeforeMethodpublic void setup() throws Exception {DesiredCapabilities capabilities = new DesiredCapabilities();capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");capabilities.setCapability(CapabilityType.VERSION, "4.2.2");capabilities.setCapability(CapabilityType.PLATFORM, "Windows");capabilities.setCapability("app-package", "com.example.testapp");capabilities.setCapability("app-activity", "TestActivity");driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);}@Testpublic void test() {System.out.println("Printing available Window Handles:\n");for (String handle : driver.getWindowHandles()) {System.out.println("Handle: " + handle);}}@AfterClasspublic void teardown() {// close the appdriver.quit();}}
Hi,thanks a lot for your answer. But as soon as I use, I get the following error:capabilities.setCapability("device", "selendroid");org.openqa.selenium.remote.SessionNotFoundException: A session is either terminated or not started (Original error: java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.cordova.hellocordova.selendroid/io.selendroid.ServerInstrumentation} from pid=25959, uid=25959 not allowed because package io.cordova.hellocordova.selendroid does not have a signature matching the target io.cordova.hellocordova
You got a hint for me?2013/9/12 Jonathan Lipps <jli...@gmail.com>
You need to use Selendroid for webview automation. These desired caps should work:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("device", "selendroid");
capabilities.setCapability("app-package", "com.example.testapp");capabilities.setCapability("app-activity", "TestActivity");driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
Then follow the instructions to switch to webview etc
--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.
C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium>node server.js --app-pkg "io.cordova.hellocordova" --app-activity "HelloCordova" --app "C:\xampp\htdocs\phonegap\SimpleTest\platforms\android\bin\SimpleTest.apk"info: Welcome to Appium v0.9.0 (REV 1ed240811d9a586fb1913d400585a7e29dbe96b0)info: Appium REST http interface listener started on 0.0.0.0:4723info - socket.io starteddebug: Appium request initiated at /wd/hub/sessiondebug: Request received with params: {"desiredCapabilities":{"app-package":"io.cordova.hellocordova","device":"selendroid","app-activity":"HelloCordova"}}info: Using local app from command line: C:\xampp\htdocs\phonegap\SimpleTest\platforms\android\bin\SimpleTest.apkinfo: Creating new appium session af4518d7-8110-4ea7-9ed1-894cb3c3e2d6info: Starting selendroid serverinfo: Checking whether selendroid is built yetinfo: Selendroid server exists!info: Starting selendroidinfo: Preparing device for sessioninfo: Checking whether app is actually presentinfo: Checking whether adb is presentinfo: [ADB] Using adb from C:\adt-x86_64\sdk\platform-tools\adb.exeinfo: Trying to find a connected android deviceinfo: [ADB] Getting connected devices...info: [ADB] 1 device(s) connectedinfo: [ADB] Setting device id to 5851d8bainfo: Found device, no need to retryinfo: [ADB] Waiting for device 5851d8ba to be ready and to respond to shell commands (timeout = 5)info: Starting logcat captureinfo: Checking whether we need to run fast resetdebug: APK doesn't exist. C:\Windows\Temp\io.cordova.hellocordova.clean.apkdebug: Checking app cert for C:\xampp\htdocs\phonegap\SimpleTest\platforms\android\bin\SimpleTest.apk: java -jar "C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\verify.jar" "C:\xampp\htdocs\phonegap\SimpleTest\platforms\android\bin\SimpleTest.apk"debug: App already signed.debug: App signed? true C:\xampp\htdocs\phonegap\SimpleTest\platforms\android\bin\SimpleTest.apkinfo: Building fast resetinfo: Checking whether aapt is presentinfo: [ADB] Using aapt from C:\adt-x86_64\sdk\build-tools\android-4.3\aapt.exeinfo: Compiling manifest C:\Windows\Temp\AndroidManifest.xmldebug: "C:\adt-x86_64\sdk\build-tools\android-4.3\aapt.exe" package -M "C:\Windows\Temp\AndroidManifest.xml" --rename-manifest-package "io.cordova.hellocordova.clean" --rename-instrumentation-target-package "io.cordova.hellocordova" -I "C:\adt-x86_64\sdk\platforms\android-18\android.jar" -F "C:\Windows\Temp\AndroidManifest.xml.apk" -fdebug: Compiled manifestinfo: Inserting manifest, src: C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\Clean.apk, dst: C:\Windows\Temp\io.cordova.hellocordova.clean.apkdebug: Extracting manifestinfo: Unzipping C:\Windows\Temp\AndroidManifest.xml.apkinfo: Testing zip archive: C:\Windows\Temp\AndroidManifest.xml.apkinfo: Zip archive tested cleaninfo: Unzip successfuldebug: Writing tmp apk. C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\Clean.apk to C:\Windows\Temp\io.cordova.hellocordova.clean.apkdebug: Testing new tmp apk.info: Testing zip archive: C:\Windows\Temp\io.cordova.hellocordova.clean.apkinfo: Zip archive tested cleandebug: Moving manifest with: "C:\JDK64\bin\java.exe" -jar "C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\move_manifest.jar" "C:\Windows\Temp\io.cordova.hellocordova.clean.apk" "C:\Windows\Temp\AndroidManifest.xml"debug: Inserted manifest.debug: Skip app sign. Sign clean apk.debug: Resigning apks with: java -jar "C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\sign.jar" "C:\Windows\Temp\io.cordova.hellocordova.clean.apk" --overrideinfo: Rebuilt selendroid apk exists, doing nothinginfo: Rebuilt selendroid server already exists, no need to rebuild it with a newmanifestinfo: Checking signed status of C:\Windows\Temp\selendroid.io.cordova.hellocordova.apkdebug: Checking app cert for C:\Windows\Temp\selendroid.io.cordova.hellocordova.apk: java -jar "C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\verify.jar" "C:\Windows\Temp\selendroid.io.cordova.hellocordova.apk"info: Checking signed status of C:\xampp\htdocs\phonegap\SimpleTest\platforms\android\bin\SimpleTest.apkdebug: Checking app cert for C:\xampp\htdocs\phonegap\SimpleTest\platforms\android\bin\SimpleTest.apk: java -jar "C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\verify.jar" "C:\xampp\htdocs\phonegap\SimpleTest\platforms\android\bin\SimpleTest.apk"debug: App already signed.debug: App already signed.debug: Getting install/clean status for io.cordova.hellocordova.selendroidinfo: Rebuilt selendroid is already installedinfo: Determining app install/clean statusdebug: Getting install/clean status for io.cordova.hellocordovainfo: [ADB] Installing clean apkinfo: Installing C:\Windows\Temp\io.cordova.hellocordova.clean.apkdebug: pkg: /data/local/tmp/io.cordova.hellocordova.clean.apkSuccessdebug: Running fast reset clean: "C:\adt-x86_64\sdk\platform-tools\adb.exe" -s 5851d8ba shell am instrument io.cordova.hellocordova.clean/clean.apk.Cleaninfo: [ADB] Forwarding system:8080 to device:8080info: [ADB] Attempting to unlock screeninfo: Starting instrumentation process for selendroid with cmd: "C:\adt-x86_64\sdk\platform-tools\adb.exe" -s 5851d8ba shell am instrument -e main_activity 'io.cordova.hellocordovaHelloCordova' io.cordova.hellocordova.selendroid/io.selendroid.ServerInstrumentation
error: java.lang.SecurityException: Permission Denial: starting instrumentationComponentInfo{io.cordova.hellocordova.selendroid/io.selendroid.ServerInstrumenta
tion} from pid=27885, uid=27885 not allowed because package io.cordova.hellocord
ova.selendroid does not have a signature matching the target io.cordova.hellocordova
at android.os.Parcel.readException(Parcel.java:1425)at android.os.Parcel.readException(Parcel.java:1379)at android.app.ActivityManagerProxy.startInstrumentation(ActivityManagerNative.java:3148)at com.android.commands.am.Am.runInstrument(Am.java:675)at com.android.commands.am.Am.run(Am.java:119)at com.android.commands.am.Am.main(Am.java:82)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)info: Overriding session id with ,,,,,,,,,,,,,,,,,,error: Failed to start an Appium session, err was: Error: java.lang.SecurityExce
ption: Permission Denial: starting instrumentation ComponentInfo{io.cordova.hell
ocordova.selendroid/io.selendroid.ServerInstrumentation} from pid=27885, uid=27885 not allowed because package io.cordova.hellocordova.selendroid does not have
a signature matching the target io.cordova.hellocordova
info: Responding to client with error: {"status":6,"value":{"message":"A session
is either terminated or not started (Original error: java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.cordova.hellocor
dova.selendroid/io.selendroid.ServerInstrumentation} from pid=27885, uid=27885 n
ot allowed because package io.cordova.hellocordova.selendroid does not have a si
gnature matching the target io.cordova.hellocordova\r\r)","origValue":"java.lang
.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.cordova.hellocordova.selendroid/io.selendroid.ServerInstrumentation} from pid=2
7885, uid=27885 not allowed because package io.cordova.hellocordova.selendroid does not have a signature matching the target io.cordova.hellocordova\r\r"},"sessionId":null}POST /wd/hub/session 500 7206ms - 801info: Clearing out appium devices
C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium>node server.js --app-pk
g "io.cordova.hellocordova" --app-activity "HelloCordova" --app "C:\Users\da.hess\Desktop\SimpleTest.apk"
info: Welcome to Appium v0.9.0 (REV 1ed240811d9a586fb1913d400585a7e29dbe96b0)info: Appium REST http interface listener started on 0.0.0.0:4723info - socket.io starteddebug: Appium request initiated at /wd/hub/sessiondebug: Request received with params: {"desiredCapabilities":{"app-package":"io.cordova.hellocordova","device":"selendroid","app-activity":"HelloCordova"}}
info: Using local app from command line: C:\Users\da.hess\Desktop\SimpleTest.apkinfo: Creating new appium session 5e426c81-9248-43b4-a710-056a1366f1f7
info: Starting selendroid serverinfo: Checking whether selendroid is built yetinfo: Selendroid server exists!info: Starting selendroidinfo: Preparing device for sessioninfo: Checking whether app is actually presentinfo: Checking whether adb is presentinfo: [ADB] Using adb from C:\adt-x86_64\sdk\platform-tools\adb.exeinfo: Trying to find a connected android deviceinfo: [ADB] Getting connected devices...info: [ADB] 1 device(s) connectedinfo: [ADB] Setting device id to 5851d8bainfo: Found device, no need to retryinfo: [ADB] Waiting for device 5851d8ba to be ready and to respond to shell commands (timeout = 5)info: Starting logcat captureinfo: Checking whether we need to run fast reset
debug: Checking app cert for C:\Windows\Temp\io.cordova.hellocordova.clean.apk:
java -jar "C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\
verify.jar" "C:\Windows\Temp\io.cordova.hellocordova.clean.apk"debug: App already signed.debug: Checking app cert for C:\Users\da.hess\Desktop\SimpleTest.apk: java -jar"C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\verify.jar" "C:\Users\da.hess\Desktop\SimpleTest.apk"debug: App already signed.debug: App signed? true C:\Users\da.hess\Desktop\SimpleTest.apk
info: Rebuilt selendroid apk exists, doing nothinginfo: Rebuilt selendroid server already exists, no need to rebuild it with a newmanifestinfo: Checking signed status of C:\Windows\Temp\selendroid.io.cordova.hellocordova.apkdebug: Checking app cert for C:\Windows\Temp\selendroid.io.cordova.hellocordova.apk: java -jar "C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\verify.jar" "C:\Windows\Temp\selendroid.io.cordova.hellocordova.apk"
info: Checking signed status of C:\Users\da.hess\Desktop\SimpleTest.apkdebug: Checking app cert for C:\Users\da.hess\Desktop\SimpleTest.apk: java -jar"C:\Users\da.hess\AppData\Roaming\npm\node_modules\appium\app\android\verify.jar" "C:\Users\da.hess\Desktop\SimpleTest.apk"
debug: App already signed.debug: App already signed.debug: Getting install/clean status for io.cordova.hellocordova.selendroid
info: Rebuilt selendroid is not installed, installing itinfo: Installing C:\Windows\Temp\selendroid.io.cordova.hellocordova.apkdebug: pkg: /data/local/tmp/selendroid.io.cordova.hellocordova.apkSuccess
info: Determining app install/clean statusdebug: Getting install/clean status for io.cordova.hellocordova
info: [ADB] Installing app apkinfo: Installing C:\Users\da.hess\Desktop\SimpleTest.apkdebug: pkg: /data/local/tmp/SimpleTest.apkSuccess
info: [ADB] Forwarding system:8080 to device:8080info: [ADB] Attempting to unlock screeninfo: Starting instrumentation process for selendroid with cmd: "C:\adt-x86_64\sdk\platform-tools\adb.exe" -s 5851d8ba shell am instrument -e main_activity 'io.cordova.hellocordovaHelloCordova' io.cordova.hellocordova.selendroid/io.selendroid.ServerInstrumentation
info: Selendroid server is launchinginfo: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}info: Selendroid server is alive!info: Creating Selendroid sessioninfo: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session","method":"POST","json":{"desiredCapabilities":{"app-package":"io.cordova.hell
ocordova","device":"selendroid","app-activity":"HelloCordova"}}}
info: Successfully started selendroid sessioninfo: Waiting for app's activity to become focusedinfo: Getting focused package and activityinfo: Getting focused package and activityinfo: Getting focused package and activityerror: App never showed up as active. appActivity: com.android.launcher2.Launcher != HelloCordovainfo: Selendroid hasn't started app yet, let's do it manually with adb.startAppinfo: Starting appinfo: [ADB] Starting app"C:\adt-x86_64\sdk\platform-tools\adb.exe" -s 5851d8ba shell am start -n io.cordova.hellocordova/HelloCordovainfo: We tried to start an activity that doesn't exist, retrying with . prepended to activityinfo: Starting appinfo: [ADB] Starting app"C:\adt-x86_64\sdk\platform-tools\adb.exe" -s 5851d8ba shell am start -n io.cordova.hellocordova/.HelloCordovainfo: Waiting for app's activity to become focusedinfo: Getting focused package and activityinfo: Overriding session id with 3a86b526-6f09-46b7-abd2-28bb16b7886einfo: Appium session started with sessionId 3a86b526-6f09-46b7-abd2-28bb16b7886ePOST /wd/hub/session 303 21803ms - 9debug: Appium request initiated at /wd/hub/session/3a86b526-6f09-46b7-abd2-28bb16b7886edebug: Proxying command to localhost:8080info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/3a86b526-6f09-46b7-abd2-28bb16b7886e","method":"GET"}debug: Proxied response received with status 200: "{\"value\":{\"platform\":\"android\",\"acceptSslCerts\":true,\"javascriptEnabled\":true,\"handlesAlerts\":false,\"browserName\":\"selendroid\",\"rotatable\":false,\"takesScreenshot\":true,\"version\":\"0.5.0\"},\"status\":0,\"sessionId\":\"3a86b526-6f09-46b7-abd2-28bb16b7886e\"}"GET /wd/hub/session/3a86b526-6f09-46b7-abd2-28bb16b7886e 200 26ms - 249debug: Appium request initiated at /wd/hub/session/3a86b526-6f09-46b7-abd2-28bb16b7886e/windowdebug: Request received with params: {"name":"WEBVIEW"}debug: Proxying command to localhost:8080info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/3a86b526-6f09-46b7-abd2-28bb16b7886e/window","method":"POST","json":{"name":"WEBVIEW"}}debug: Proxied response received with status 200: {"value":"","status":0,"sessionId":"3a86b526-6f09-46b7-abd2-28bb16b7886e"}POST /wd/hub/session/3a86b526-6f09-46b7-abd2-28bb16b7886e/window 200 123ms - 87debug: Appium request initiated at /wd/hub/session/3a86b526-6f09-46b7-abd2-28bb16b7886einfo: Shutting down appium session...info: Stopping selendroid serverinfo: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/3a86b526-6f09-46b7-abd2-28bb16b7886e","method":"DELETE"}info: Killing app
info: Clearing out appium devices
info: Responding to client with success: {"status":0,"value":null,"sessionId":"3a86b526-6f09-46b7-abd2-28bb16b7886e"}DELETE /wd/hub/session/3a86b526-6f09-46b7-abd2-28bb16b7886e 200 782ms - 89