trying to write a simple demo monkeyrunner python script

 
device.startActivity( component='com.android.calculator2/.Calculator' )
    time.sleep(1)
    device.type( '2*3=' )

this works as I expect,  starts the calculator and it displays the
correct result, having some difficulty with the browser.  I can start
it with a given url

 
device.startActivity( component='com.android.browser/.BrowserActivity',
uri='http://www.amazon.com' )

but if I try to send a url after the browser starts with
device.type()  leading characters are getting dropped:

 
device.startActivity( component='com.android.browser/.BrowserActivity' )
    time.sleep(5)
    device.press('KEYCODE_ENTER', 'DOWN_AND_UP')
    device.type('www.yahoo.com')
    device.press('KEYCODE_ENTER', 'DOWN_AND_UP')

logcat shows the correct string, but the first two 'w' are dropped
when the string is reported by the SearchDialog.  Any idea what is
causing the dropped characters?

logcat ( minus dalvik msgs)
====================
I/ActivityManager(   61): Start proc com.android.browser for activity
com.android.browser/.BrowserActivity: pid=1421 uid=10033 gids={3003,
1015}
I/ActivityThread( 1421): Pub browser:
com.android.browser.BrowserProvider
I/BrowserSettings( 1421): Selected search engine:
ActivitySearchEngine{android.app.SearchableInfo@405998b0}
I/ActivityManager(   61): Displayed
com.android.browser/.BrowserActivity: +1s524ms
D/MonkeyStub( 1404): translateCommand: press KEYCODE_ENTER
W/KeyCharacterMap( 1421): No keyboard for id 0
W/KeyCharacterMap( 1421): Using default keymap: /system/usr/keychars/
qwerty.kcm.bin
D/MonkeyStub( 1404): translateCommand: type www.yahoo.com
W/KeyCharacterMap( 1404): No keyboard for id 0
W/KeyCharacterMap( 1404): Using default keymap: /system/usr/keychars/
qwerty.kcm.bin
W/KeyCharacterMap( 1421): No keyboard for id 0
W/KeyCharacterMap( 1421): Using default keymap: /system/usr/keychars/
qwerty.kcm.bin
W/KeyCharacterMap( 1421): No keyboard for id 0
W/KeyCharacterMap( 1421): Using default keymap: /system/usr/keychars/
qwerty.kcm.bin
D/MonkeyStub( 1404): translateCommand: press KEYCODE_ENTER
D/MonkeyStub( 1404): Quit requested
D/SearchDialog( 1421): launching Intent
{ act=android.intent.action.SEARCH flg=0x10000000
cmp=com.android.browser/.BrowserActivity (has extras) }
I/SearchDialog( 1421): Starting (as ourselves)
#Intent;action=android.intent.action.SEARCH;launchFlags=0x10000000;component=com.android.browser/.BrowserActivity;S.query=w.yahoo.com;S.user_query=w.yahoo.com;end
I/ActivityManager(   61): Starting: Intent
{ act=android.intent.action.SEARCH flg=0x10000000
cmp=com.android.browser/.BrowserActivity (has extras) } from pid 1421
V/webkit  ( 1421): guessURL before queueRequest: w.yahoo.com
W/SuggestionsAdapter( 1421): Tried to change cursor after adapter was
closed.

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