thanks to you both - Bill & Greg

With Greg's suggestion, everything works fine :)
- ShellCommandUnresponsiveException still coming, and I am ignoring
it, still everything works fine
- device.takeSnapShot is wrong and using proper method call (as
suggested by Bill) that also works fine.



On Dec 10, 1:54 am, Greg <[email protected]> wrote:
> Try replacing your call to startActivity with:
> device.startActivity(component='com.collabera.swarup/.DummyActivity')
>
> Greg
>
> On Dec 9, 1:11 pm, swarup <[email protected]> wrote:
>
>
>
>
>
>
>
> > Nope, ignoring didn't help, its not launching target activity. The
> > menu key is getting pressed on the home screen itself, and whole test
> > case fails :(
> > Also I noticed the same issue for CTS 2.2, lots of test cases fail
> > with same error.
>
> > any clue for this issue would be appreciated.
>
> > On Dec 9, 11:34 pm, Bill Napier <[email protected]> wrote:
>
> > > Hi,
>
> > > You can safely ignore that log message.  I know it looks scary, but things
> > > are still working (I got the same message when I just tried, but the rest 
> > > of
> > > the script ran fine).  In a later build that message will be totally be
> > > gone.
>
> > > Also, I noticed a slight typo in the docs regarding takeSnapshot.  The
> > > correct code should look like this:
>
> > > # Takes a screenshot
> > > result = device.takeSnapshot()
>
> > > Bill
>
> > > On Thu, Dec 9, 2010 at 12:26 AM, swarup <[email protected]> wrote:
> > > > the same issue also seen on ADP1.
> > > > I tried tunning monkeyrunner on ADP1, and got the exact the same
> > > > error.
>
> > > > Looks like not emulator problem, might be a ADB code issue.
>
> > > > did anyone face similar issue?
>
> > > > On Dec 9, 1:02 pm, swarup <[email protected]> wrote:
> > > > > Hi,
> > > > > I am trying to run 'monkeyrunner' tool for emulator and I end up with
> > > > > the below error:
> > > > > ----------------------------------------------------------------
> > > > > 101209 13:12:11.321:I [main] [com.android.monkeyrunner.MonkeyManager]
> > > > > Monkey Command: wake.
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
> > > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice] Error starting command:
> > > > > monkey --port 12345
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
>
> > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice]com.android.ddmlib.ShellComma
> > > > ndUnresponsiveException
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
> > > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > > > > com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:408)
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
> > > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > > > > com.android.ddmlib.Device.executeShellCommand(Device.java:276)
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
> > > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > > > > com.android.monkeyrunner.adb.AdbMonkeyDevice
> > > > > $1.run(AdbMonkeyDevice.java:89)
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
> > > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > > > > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
> > > > > 417)
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
> > > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > > > > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
> > > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > > > > java.util.concurrent.FutureTask.run(FutureTask.java:123)
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
> > > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > > > > java.util.concurrent.ThreadPoolExecutor
> > > > > $Worker.runTask(ThreadPoolExecutor.java:651)
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
> > > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > > > > java.util.concurrent.ThreadPoolExecutor
> > > > > $Worker.run(ThreadPoolExecutor.java:676)
> > > > > 101209 13:12:14.345:S [pool-1-thread-1]
> > > > > [com.android.monkeyrunner.adb.AdbMonkeyDevice]  at
> > > > > java.lang.Thread.run(Thread.java:595)
> > > > > ...
> > > > > ...
> > > > > ...
> > > > > ----------------------------------------------------------------
>
> > > > > I am having the following environment:
> > > > > ----------------------------------------------------------------
> > > > > OS : Ubuntu 10.04
> > > > > Jython : 2.2.1
> > > > > Android SDK : 2.3 (GingerBread)
> > > > > Device : Emulator
> > > > > ----------------------------------------------------------------
>
> > > > > The target app for monkeyrunner is one of my DummyApp. Here is the
> > > > > jython script I am using (its same one mentioned athttp://
> > > > d.android.com/guide/developing/tools/monkeyrunner_concepts.html)
> > > > > ----------------------------------------------------------------
> > > > > from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
>
> > > > > device = MonkeyRunner.waitForConnection()
> > > > > device.installPackage('/home/swarup/DummyApp.apk')
> > > > > device.startActivity(component='com.collabera.swarup.DummyActivity')
> > > > > device.press('KEYCODE_MENU','DOWN_AND_UP')
> > > > > result = device.takeSnapShot()
> > > > > result.writeToFile('myproject/shot1.png','png')
> > > > > ----------------------------------------------------------------
>
> > > > > Running only 'monkey' command works fine, but monkeyrunner fails. Any
> > > > > clue in this regard would be a great help.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<android-developers%2Bunsubs
> > > >  [email protected]>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to