Hi there,

I am writing a set of scripts that drive an app on several emulators 
simultaneously. My main script spawns several threads, each of which runs 
an instance of MonkeyRunner and I am using a Monkey script to interact with 
the app and using a loop calling repeatedly 

device.getProperty('am.current.comp.class') 

to identify the class that originates the current activity. This is to 
react differently by performing different actions depending on the activity 
being displayed.
This seems to work reasonably well for one emulator, but the moment I have 
two or more emulators running at the same time, the call to 
device.getProperty('am.current.comp.class') seems to get stuck on a class 
that displayed an earlier activity.
Any idea why that might be? Note that I am connecting to the correct 
emulator by using 

device = MonkeyRunner.waitForConnection(deviceId=emulatorName)

where emulatorName starts off tipically at 'emulator-5554'.

Alternatively, is there a more reliable way to achieve this with a sort of 
monitoring app that sits in the emulator and, somehow (not sure how), 
communicates with the driving script?

Many thanks,
Alberto

-- 
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

Reply via email to