Hi Bill, Take a look at this diff: http://android.git.kernel.org/?p=platform/sdk.git;a=blobdiff;f=monkeyrunner/src/com/android/monkeyrunner/MonkeyImage.java;h=4480c225fcc0992d40562b68545a00268fb84b54;hp=b55b4f39d5900c163b926bd81ee0a223cdc8130e;hb=HEAD;hpb=9920695ea25aec4589d28c88f8874c86a6e908af
In the middle (near the end) there is a todo comment to check if this conversion works or not (after changing IMonkeyImage to IChimpImage) - unfortunately it is not working. Thanks Raja On Jul 11, 12:22 am, Sean Wang <wangxiao8...@gmail.com> wrote: > Hi, Now I am using the monkeyrunner with Android SDK_r12. Also got > this problem. > OS: Win7 x64 professional > Java: Sun Java 1.6.0_25 32bit version > Monkeyrunner is the one in Android sdk_r12 build, not built by myself. > > The log is below: > > C:\Users\dell>monkeyrunner > Jython 2.5.0 (Release_2_5_0:6476, Jun 16 2009, 13:33:26) > [Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_25>>> from > com.android.monkeyrunner import MonkeyRunner as MR > >>> d=MR.waitForConnection() > >>> i1=d.takeSnapshot() > >>> i2=d.takeSnapshot() > >>> i1.sameAs(i2) > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > at > com.android.monkeyrunner.MonkeyImage.sameAs(MonkeyImage.java:138) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. > java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > sorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > > java.lang.ClassCastException: java.lang.ClassCastException: > org.python.core.PySi > ngleton cannot be cast to com.android.monkeyrunner.core.IMonkeyImage > > On 5月25日, 上午6时05分, Bill Napier <nap...@android.com> wrote: > > > > > > > > > your stack trace doesn't match your code: > > > if img_1.sameAs(1, img_2): > > > has the arguments in the wrong order. It should be: > > > if img_1.sameAs(img_2, 1) > > > On Mon, May 23, 2011 at 2:58 AM, Alexander Sukhov > > <testsem...@gmail.com>wrote: > > > > Hello, > > > > I build SDK from source code. > > > And i want to use the following script: > > > > img=MonkeyRunner.loadImageFromFile(path='bla bla bla') > > > > img_1=device.takeSnapshot() > > > > img_1.sameAs(img, 1) > > > > But this error: > > > File "/home/semc/monkey/out/host/linux-x86/sdk/android- > > > sdk_eng.semc_linux-x86/tools/test.py", line 23, in <module> > > > if img_1.sameAs(1, img_2): > > > at > > > com.android.monkeyrunner.MonkeyImage.sameAs(MonkeyImage.java:138) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > > > 39) > > > at > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp > > > l.java: > > > 25) > > > at java.lang.reflect.Method.invoke(Method.java:597) > > > > java.lang.ClassCastException: java.lang.ClassCastException: > > > org.python.core.PySingleton cannot be cast to > > > com.android.monkeyrunner.core.IMonkeyImage > > > > Please help! > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to android-developers@googlegroups.com > > > To unsubscribe from this group, send email to > > > android-developers+unsubscr...@googlegroups.com > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > > -- > > Note: please don't send private questions to me, as I don't have time > > to provide private support. All such questions should be posted on > > public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en