landryshuai / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

Robotium not working with cordova 3.6.3 #678

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I got this error "Test failed to run to completion. Reason: 'Instrumentation 
run failed due to 'java.lang.ClassCastException''. Check device logcat for 
details" when i try to record my cordova app using Robotium. 

here is my detailed log:
05-19 12:31:17.373: E/AndroidRuntime(1709): java.lang.ClassCastException: 
com.robotium.recorder.executor.e.a cannot be cast to 
org.apache.cordova.CordovaChromeClient
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
org.apache.cordova.CordovaWebView.setWebChromeClient(CordovaWebView.java:316)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
com.robotium.recorder.executor.e.l.run(l.java)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
android.app.Instrumentation$SyncRunnable.run(Instrumentation.java:1569)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
android.os.Handler.handleCallback(Handler.java:605)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
android.os.Handler.dispatchMessage(Handler.java:92)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
android.os.Looper.loop(Looper.java:137)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
android.app.ActivityThread.main(ActivityThread.java:4424)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
java.lang.reflect.Method.invokeNative(Native Method)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
java.lang.reflect.Method.invoke(Method.java:511)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-19 12:31:17.373: E/AndroidRuntime(1709):     at 
dalvik.system.NativeStart.main(Native Method)

How to solve this issue?

Original issue reported on code.google.com by sktniran...@gmail.com on 19 May 2015 at 7:15

GoogleCodeExporter commented 9 years ago
Cordova uses their own custom web client and therefore it is not compatible 
with Robotium Recorder.  

Original comment by renasr...@gmail.com on 19 May 2015 at 2:25

GoogleCodeExporter commented 9 years ago
So there is no work around by which we can automate Cordova app using Robotium ?

Original comment by nayanshr...@gmail.com on 4 Jun 2015 at 8:27