lovelysystems / robotframework-androidlibrary

Robot Framework Automation Library for Android
29 stars 22 forks source link

KEYWORD: AndroidLibrary.Screen Should Contain is always failing #47

Open sps7 opened 11 years ago

sps7 commented 11 years ago

I am executing on WindowsXp SP3, with calabash-android version 0.3.8, And getting below error:

KEYWORD: AndroidLibrary.Screen Should Contain Hummus Expand All Documentation: Asserts that the current screen contains a given text

Start / End / Elapsed: 20130122 12:56:32.468 / 20130122 12:56:37.703 / 00:00:05.235 
12:56:32.468 TRACE Arguments: [ u'Hummus' ] 
12:56:32.468 DEBUG Test timeout 10 minutes active. 588.157 seconds left. 
12:56:32.468 DEBUG >> '{"command": "assert_text", "arguments": ["Hummus", true]}' 
12:56:32.468 DEBUG >> () {'headers': {'Content-Type': 'application/json'}, 'data': '{"command": "assert_text", "arguments": ["Hummus", true]}'} 
12:56:32.468 INFO Starting new HTTP connection (1): localhost 
12:56:37.515 DEBUG "POST / HTTP/1.1" 200 None 
12:56:37.687 WARN << u'http://localhost:34777/' 
12:56:37.703 WARN << u'{"bonusInformation":[],"message":"","success":true}' 
12:56:37.703 FAIL TypeError: 'instancemethod' object has no attribute '__getitem__' 
12:56:37.703 DEBUG Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\AndroidLibrary\__init__.py", line 465, in screen_should_contain
    assert result["success"] is True, "Screen does not contain text '%s': %s" % ( 

And getting message: Message: TypeError: 'instancemethod' object has no attribute '__getitem__' 

attaching logcat for reference:

I/InstrumentationBackend( 5158): Added:'GetMapMarkers', with key:'get_map_markers'

I/InstrumentationBackend( 5158): Added:'GetMapZoom', with key:'get_map_zoom'

I/Choreographer(  997): Skipped 38 frames!  The application may be doing too much work on its main thread.

I/InstrumentationBackend( 5158): Added:'PanMapTo', with key:'pan_map_to'

I/InstrumentationBackend( 5158): Added:'SetMapCenter', with key:'set_map_center'

I/InstrumentationBackend( 5158): Added:'SetMapZoom', with key:'set_map_zoom'

I/InstrumentationBackend( 5158): Added:'TapAwayFromMarkers', with key:'tap_map_away_from_markers'

I/InstrumentationBackend( 5158): Added:'TapMapMarker', with key:'tap_map_marker_by_title'

I/InstrumentationBackend( 5158): Added:'ScrollDown', with key:'scroll_down'

I/InstrumentationBackend( 5158): Added:'ScrollUp', with key:'scroll_up'

I/InstrumentationBackend( 5158): Added:'EnterQueryByIndex', with key:'enter_query_into_numbered_field'

I/InstrumentationBackend( 5158): Added:'DownKey', with key:'send_key_down'

I/InstrumentationBackend( 5158): Added:'EnterKey', with key:'send_key_enter'

I/InstrumentationBackend( 5158): Added:'GoBack', with key:'go_back'

I/InstrumentationBackend( 5158): Added:'PressMenu', with key:'press_menu'

I/InstrumentationBackend( 5158): Added:'SelectFromMenuByText', with key:'select_from_menu'

I/InstrumentationBackend( 5158): Added:'GetSelectedSpinnerItemText', with key:'get_selected_spinner_item_text'

I/InstrumentationBackend( 5158): Added:'SelectSpinnerItemByContentDescription', with key:'select_item_from_named_spinner'

I/InstrumentationBackend( 5158): Added:'AssertGridViewContainsNoDuplicates', with key:'assert_no_duplicates_in_grid'

I/InstrumentationBackend( 5158): Added:'AssertText', with key:'assert_text'

I/InstrumentationBackend( 5158): Added:'AssertTextOfSpecificTextViewByContentDescription', with key:'assert_text_in_textview'

I/InstrumentationBackend( 5158): Added:'ClearTextById', with key:'clear_id_field'

I/InstrumentationBackend( 5158): Added:'ClearTextByIndex', with key:'clear_numbered_field'

I/InstrumentationBackend( 5158): Added:'ClearTextFieldByContentDescription', with key:'clear_named_field'

I/InstrumentationBackend( 5158): Added:'ClickOnText', with key:'click_on_text'

D/dalvikvm( 1306): GC_FOR_ALLOC freed 1456K, 32% free 15301K/22343K, paused 268ms, total 268ms

I/InstrumentationBackend( 5158): Added:'EnterTextByContentDescription', with key:'enter_text_into_named_field'

I/InstrumentationBackend( 5158): Added:'EnterTextById', with key:'enter_text_into_id_field'

I/InstrumentationBackend( 5158): Added:'EnterTextByIndex', with key:'enter_text_into_numbered_field'

I/InstrumentationBackend( 5158): Added:'GetTextById', with key:'get_text_by_id'

I/InstrumentationBackend( 5158): Added:'SetDateByContentDescription', with key:'set_date_with_description'

I/InstrumentationBackend( 5158): Added:'SetDateByIndex', with key:'set_date_with_index'

I/InstrumentationBackend( 5158): Added:'SetTimeByContentDescription', with key:'set_time_with_description'

I/InstrumentationBackend( 5158): Added:'SetTimeByIndex', with key:'set_time_with_index'

I/InstrumentationBackend( 5158): Added:'WaitForViewById', with key:'wait_for_view_by_id'

I/InstrumentationBackend( 5158): Added:'GetViewProperty', with key:'get_view_property'

I/InstrumentationBackend( 5158): Added:'AssertViewProperty', with key:'assert_view_property'

I/InstrumentationBackend( 5158): Added:'ClickOnViewByDescription', with key:'click_on_view_by_description'

I/InstrumentationBackend( 5158): Added:'ClickOnViewById', with key:'click_on_view_by_id'

I/InstrumentationBackend( 5158): Added:'GetActivityName', with key:'get_activity_name'

I/InstrumentationBackend( 5158): Added:'HasView', with key:'has_view'

I/InstrumentationBackend( 5158): Added:'IsCurrentActivityFocused', with key:'is_current_activity_focused'

I/InstrumentationBackend( 5158): Added:'IsEnabled', with key:'is_enabled'

I/InstrumentationBackend( 5158): Added:'LongPressOnViewById', with key:'long_press_on_view_by_id'

I/Choreographer(  997): Skipped 40 frames!  The application may be doing too much work on its main thread.

I/InstrumentationBackend( 5158): Added:'Press', with key:'press'

I/InstrumentationBackend( 5158): Added:'SelectTab', with key:'select_tab'

I/Choreographer( 5158): Skipped 49 frames!  The application may be doing too much work on its main thread.

I/InstrumentationBackend( 5158): Added:'Wait', with key:'wait'

I/InstrumentationBackend( 5158): Added:'WaitForDialogClose', with key:'wait_for_dialog_to_close'

I/InstrumentationBackend( 5158): Added:'WaitForProgress', with key:'wait_for_no_progress_bars'

I/InstrumentationBackend( 5158): Added:'WaitForScreen', with key:'wait_for_screen'

I/System.out( 5158): URI: /ping

I/InstrumentationBackend( 5158): Added:'WaitForTab', with key:'wait_for_tab'

I/InstrumentationBackend( 5158): Added:'WaitForText', with key:'wait_for_text'

I/InstrumentationBackend( 5158): Added:'WaitForView', with key:'wait_for_view'

I/InstrumentationBackend( 5158): Added:'DumpBodyHtml', with key:'dump_body_html'

I/InstrumentationBackend( 5158): Added:'DumpHtml', with key:'dump_html'

I/InstrumentationBackend( 5158): Added:'EnterTextByCssSelector', with key:'enter_text_by_selector'

I/InstrumentationBackend( 5158): Added:'ExecuteAsyncJavascript', with key:'execute_async_javascript'

I/InstrumentationBackend( 5158): Added:'ExecuteJavascript', with key:'execute_javascript'

I/InstrumentationBackend( 5158): Added:'GetLoadProgress', with key:'get_load_progress'

I/InstrumentationBackend( 5158): Added:'GetUrl', with key:'get_url'

I/InstrumentationBackend( 5158): Added:'PressByCssSelector', with key:'click_by_selector'

I/InstrumentationBackend( 5158): Added:'Query', with key:'query'

I/InstrumentationBackend( 5158): Added:'ScrollTo', with key:'scroll_to'

I/InstrumentationBackend( 5158): Added:'SetPropertyByCssSelector', with key:'set_property_by_css_selector'

I/InstrumentationBackend( 5158): Added:'SetText', with key:'set_text'

I/InstrumentationBackend( 5158): Added:'Touch', with key:'touch'

I/Choreographer( 5158): Skipped 54 frames!  The application may be doing too much work on its main thread.

I/System.out( 5158): URI: /

I/System.out( 5158): header: {content-type=application/json, user-agent=python-requests/1.1.0 CPython/2.7.3 Windows/XP, accept-encoding=gzip, deflate, compress, host=localhost:34777, accept=*/*, content-length=57}

I/System.out( 5158): params: {json={"command": "assert_text", "arguments": ["Hummus", true]}

I/System.out( 5158): }

I/System.out( 5158): files: {}

I/System.out( 5158): command: {"command": "assert_text", "arguments": ["Hummus", true]}

D/dalvikvm( 5158): GC_CONCURRENT freed 382K, 6% free 8626K/9095K, paused 23ms+19ms, total 97ms

I/InstrumentationBackend( 5158): Got command:'Command:'Line:null,assert_text', arguments:'[Hummus, true]'

D/dalvikvm( 1306): GC_CONCURRENT freed 2737K, 35% free 14545K/22343K, paused 4ms+10ms, total 49ms

D/dalvikvm( 1306): WAIT_FOR_CONCURRENT_GC blocked 19ms

I/System.out( 5158): result:{"bonusInformation":[],"message":"","success":true}

D/dalvikvm( 5158): GC_CONCURRENT freed 407K, 6% free 8658K/9159K, paused 28ms+16ms, total 79ms

I/System.out( 5158): URI: /kill

I/System.out( 5158): Stopping test server

W/WindowManager(  997): Failure taking screenshot for (246x410) to layer 21010

I/Choreographer( 5158): Skipped 33 frames!  The application may be doing too much work on its main thread.

I/Choreographer(  997): Skipped 40 frames!  The application may be doing too much work on its main thread.

I/Choreographer( 1306): Skipped 46 frames!  The application may be doing too much work on its main thread.

D/AndroidRuntime( 5183): 

D/AndroidRuntime( 5183): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<

D/AndroidRuntime( 5183): CheckJNI is ON

D/dalvikvm( 5183): Trying to load lib libjavacore.so 0x0

W/ActivityManager(  997): Duplicate finish request for ActivityRecord{b589b570 com.example.android.backuprestore/.BackupRestoreActivity}

D/dalvikvm( 5183): Added shared lib libjavacore.so 0x0

D/dalvikvm( 5183): Trying to load lib libnativehelper.so 0x0

D/dalvikvm( 5183): Added shared lib libnativehelper.so 0x0

W/InputDispatcher(  997): Permission denied: injecting event from pid 5158 uid 10043 to window Window{b5a71cd0 com.android.launcher/com.android.launcher2.Launcher paused=false} owned by uid 10015

W/InputManager(  997): Input event injection from pid 5158 permission denied.

I/AndroidRuntime( 5158): VM exiting with result code 0, cleanup skipped.

I/WindowState(  997): WIN DEATH: Window{b5a632c0 com.example.android.backuprestore/com.example.android.backuprestore.BackupRestoreActivity paused=false}

I/ActivityManager(  997): Process com.example.android.backuprestore (pid 5158) has died.

W/ActivityManager(  997): Crash of app com.example.android.backuprestore running instrumentation ComponentInfo{sh.calaba.android.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner}

I/ActivityManager(  997): Force stopping package com.example.android.backuprestore uid=10043

D/AndroidRuntime( 5143): Shutting down VM

D/dalvikvm( 5143): GC_CONCURRENT freed 101K, 79% free 449K/2048K, paused 3ms+3ms, total 26ms

D/AndroidRuntime( 5183): Calling main entry com.android.commands.input.Input

I/Input   ( 5183): InjectKeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MENU, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=1234546, downTime=1234546, deviceId=-1, source=0x101 }

I/Input   ( 5183): InjectKeyEvent: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MENU, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=1234546, downTime=1234546, deviceId=-1, source=0x101 }

D/AndroidRuntime( 5183): Shutting down VM

D/dalvikvm( 5183): GC_CONCURRENT freed 100K, 79% free 439K/2048K, paused 4ms+0ms, total 28ms

I/Choreographer( 1306): Skipped 232 frames!  The application may be doing too much work on its main thread.

D/AndroidRuntime( 5203): 

D/AndroidRuntime( 5203): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<

D/AndroidRuntime( 5203): CheckJNI is ON

D/dalvikvm( 5203): Trying to load lib libjavacore.so 0x0

D/dalvikvm( 5203): Added shared lib libjavacore.so 0x0

D/dalvikvm( 5203): Trying to load lib libnativehelper.so 0x0

D/dalvikvm( 5203): Added shared lib libnativehelper.so 0x0

D/AndroidRuntime( 5203): Calling main entry com.android.commands.am.Am

I/ActivityManager(  997): Force stopping package com.example.android.backuprestore uid=10043

I/ActivityManager(  997): Start proc com.example.android.backuprestore for added application com.example.android.backuprestore: pid=5213 uid=10043 gids={3003, 1028}

D/dalvikvm( 5213): Not late-enabling CheckJNI (already on)

I/dalvikvm( 5213): Turning on JNI app bug workarounds for target SDK version 8...

E/Trace   ( 5213): error opening trace file: No such file or directory (2)

I/System.out( 5213): Calabash did not load Mono. This is only a problem if you are trying to test a Mono application

I/TestRunner( 5213): started: testHook(sh.calaba.instrumentationbackend.InstrumentationBackend)

I/ActivityManager(  997): START {act=android.intent.action.MAIN flg=0x10000000 cmp=com.example.android.backuprestore/.BackupRestoreActivity u=0} from pid 5213

W/WindowManager(  997): Failure taking screenshot for (246x410) to layer 21010

D/dalvikvm( 5213): GC_CONCURRENT freed 254K, 4% free 8138K/8455K, paused 23ms+6ms, total 115ms

V/BRActivity( 5213): datafile exists

V/BRActivity( 5213):   mayo=false tomato=false filling=2130968579

I/Choreographer(  997): Skipped 33 frames!  The application may be doing too much work on its main thread.

V/PhoneStatusBar( 1210): setLightsOn(true)

D/gralloc_goldfish( 5213): Emulator without GPU emulation detected.

I/Choreographer(  997): Skipped 34 frames!  The application may be doing too much work on its main thread.

I/ActivityManager(  997): Displayed com.example.android.backuprestore/.BackupRestoreActivity: +925ms

E/dalvikvm( 5213): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.jayway.android.robotium.solo.Waiter.getSupportFragment

W/dalvikvm( 5213): VFY: unable to resolve check-cast 47 (Landroid/support/v4/app/FragmentActivity;) in Lcom/jayway/android/robotium/solo/Waiter;

D/dalvikvm( 5213): VFY: replacing opcode 0x1f at 0x0009

I/dalvikvm( 5213): Could not find method android.support.v4.app.FragmentActivity.getSupportFragmentManager, referenced from method com.jayway.android.robotium.solo.Waiter.getSupportFragment

W/dalvikvm( 5213): VFY: unable to resolve virtual method 92: Landroid/support/v4/app/FragmentActivity;.getSupportFragmentManager ()Landroid/support/v4/app/FragmentManager;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0010

I/dalvikvm( 5213): Could not find method android.support.v4.app.FragmentActivity.getSupportFragmentManager, referenced from method com.jayway.android.robotium.solo.Waiter.getSupportFragment

W/dalvikvm( 5213): VFY: unable to resolve virtual method 92: Landroid/support/v4/app/FragmentActivity;.getSupportFragmentManager ()Landroid/support/v4/app/FragmentManager;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0019

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/OverlayItem;)

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/OverlayItem;)

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/OverlayItem;)

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/OverlayItem;)

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/OverlayItem;)

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/OverlayItem;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.OverlayItem.getMarker, referenced from method com.jayway.android.robotium.solo.MapViewUtils.appendTransparency

W/dalvikvm( 5213): VFY: unable to resolve virtual method 234: Lcom/google/android/maps/OverlayItem;.getMarker (I)Landroid/graphics/drawable/Drawable;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0001

E/dalvikvm( 5213): Could not find class 'com.google.android.maps.MapView', referenced from method com.jayway.android.robotium.solo.MapViewUtils.getMapView

W/dalvikvm( 5213): VFY: unable to resolve const-class 101 (Lcom/google/android/maps/MapView;) in Lcom/jayway/android/robotium/solo/MapViewUtils;

D/dalvikvm( 5213): VFY: replacing opcode 0x1c at 0x0003

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/OverlayItem;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.OverlayItem.getPoint, referenced from method com.jayway.android.robotium.solo.MapViewUtils.toString

W/dalvikvm( 5213): VFY: unable to resolve virtual method 235: Lcom/google/android/maps/OverlayItem;.getPoint ()Lcom/google/android/maps/GeoPoint;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0005

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getMapCenter, referenced from method com.jayway.android.robotium.solo.MapViewUtils.getBounds

W/dalvikvm( 5213): VFY: unable to resolve virtual method 229: Lcom/google/android/maps/MapView;.getMapCenter ()Lcom/google/android/maps/GeoPoint;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0009

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getMapCenter, referenced from method com.jayway.android.robotium.solo.MapViewUtils.getMapCenter

W/dalvikvm( 5213): VFY: unable to resolve virtual method 229: Lcom/google/android/maps/MapView;.getMapCenter ()Lcom/google/android/maps/GeoPoint;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0009

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getOverlays, referenced from method com.jayway.android.robotium.solo.MapViewUtils.getMarkerItem

W/dalvikvm( 5213): VFY: unable to resolve virtual method 230: Lcom/google/android/maps/MapView;.getOverlays ()Ljava/util/List;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0009

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getOverlays, referenced from method com.jayway.android.robotium.solo.MapViewUtils.getMarkerItems

W/dalvikvm( 5213): VFY: unable to resolve virtual method 230: Lcom/google/android/maps/MapView;.getOverlays ()Ljava/util/List;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0009

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getZoomLevel, referenced from method com.jayway.android.robotium.solo.MapViewUtils.getZoom

W/dalvikvm( 5213): VFY: unable to resolve virtual method 233: Lcom/google/android/maps/MapView;.getZoomLevel ()I

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0004

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getController, referenced from method com.jayway.android.robotium.solo.MapViewUtils.panTo

W/dalvikvm( 5213): VFY: unable to resolve virtual method 225: Lcom/google/android/maps/MapView;.getController ()Lcom/google/android/maps/MapController;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0009

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getController, referenced from method com.jayway.android.robotium.solo.MapViewUtils.setCenter

W/dalvikvm( 5213): VFY: unable to resolve virtual method 225: Lcom/google/android/maps/MapView;.getController ()Lcom/google/android/maps/MapController;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0009

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getController, referenced from method com.jayway.android.robotium.solo.MapViewUtils.setZoom

W/dalvikvm( 5213): VFY: unable to resolve virtual method 225: Lcom/google/android/maps/MapView;.getController ()Lcom/google/android/maps/MapController;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0004

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getProjection, referenced from method com.jayway.android.robotium.solo.MapViewUtils.tapAwayFromMarkerItems

W/dalvikvm( 5213): VFY: unable to resolve virtual method 231: Lcom/google/android/maps/MapView;.getProjection ()Lcom/google/android/maps/Projection;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0004

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getOverlays, referenced from method com.jayway.android.robotium.solo.MapViewUtils.tapMarkerItem

W/dalvikvm( 5213): VFY: unable to resolve virtual method 230: Lcom/google/android/maps/MapView;.getOverlays ()Ljava/util/List;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0030

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getController, referenced from method com.jayway.android.robotium.solo.MapViewUtils.zoomIn

W/dalvikvm( 5213): VFY: unable to resolve virtual method 225: Lcom/google/android/maps/MapView;.getController ()Lcom/google/android/maps/MapController;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0004

W/dalvikvm( 5213): VFY: unable to find class referenced in signature (Lcom/google/android/maps/MapView;)

I/dalvikvm( 5213): Could not find method com.google.android.maps.MapView.getController, referenced from method com.jayway.android.robotium.solo.MapViewUtils.zoomOut

W/dalvikvm( 5213): VFY: unable to resolve virtual method 225: Lcom/google/android/maps/MapView;.getController ()Lcom/google/android/maps/MapController;

D/dalvikvm( 5213): VFY: replacing opcode 0x6e at 0x0004

D/dalvikvm( 5213): DexOpt: unable to opt direct call 0x00d4 at 0x15 in Lcom/jayway/android/robotium/solo/MapViewUtils;.panTo

D/dalvikvm( 5213): DexOpt: unable to opt direct call 0x00d4 at 0x15 in Lcom/jayway/android/robotium/solo/MapViewUtils;.setCenter

D/dalvikvm( 5213): GC_CONCURRENT freed 63K, 2% free 8580K/8711K, paused 17ms+18ms, total 88ms

I/InstrumentationBackend( 5213): Added:'NullAction', with key:'nullAction'

I/InstrumentationBackend( 5213): Added:'PressButtonNumber', with key:'press_button_number'

I/InstrumentationBackend( 5213): Added:'PressButtonText', with key:'press_button_with_text'

I/InstrumentationBackend( 5213): Added:'PressImageButtonDescription', with key:'press_image_button_description'

I/InstrumentationBackend( 5213): Added:'PressImageButtonNumber', with key:'press_image_button_number'

I/InstrumentationBackend( 5213): Added:'WaitForButton', with key:'wait_for_button'

I/InstrumentationBackend( 5213): Added:'ToggleCheckboxNumber', with key:'toggle_numbered_checkbox'

I/InstrumentationBackend( 5213): Added:'LongPressText', with key:'press_long_on_text'

I/InstrumentationBackend( 5213): Added:'LongPressTextAndSelectFromMenuById', with key:'press_long_on_text_and_select_with_id'

I/InstrumentationBackend( 5213): Added:'LongPressTextAndSelectFromMenuByIndex', with key:'press_long_on_text_and_select_with_index'

I/InstrumentationBackend( 5213): Added:'LongPressTextAndSelectFromMenuByText', with key:'press_long_on_text_and_select_with_text'

I/InstrumentationBackend( 5213): Added:'ClickOnScreen', with key:'click_on_screen'

I/InstrumentationBackend( 5213): Added:'Drag', with key:'drag'

I/InstrumentationBackend( 5213): Added:'Swipe', with key:'swipe'

I/InstrumentationBackend( 5213): Added:'TouchCoordinates', with key:'touch_coordinate'

I/InstrumentationBackend( 5213): Added:'InspectCurrentDialog', with key:'inspect_current_dialog'

I/InstrumentationBackend( 5213): Added:'ListActions', with key:'list_actions'

I/InstrumentationBackend( 5213): Added:'PressElement', with key:'press_l10n_element'

I/InstrumentationBackend( 5213): Added:'WaitForElement', with key:'wait_for_l10n_element'

I/InstrumentationBackend( 5213): Added:'GetListData', with key:'get_list_data'

I/InstrumentationBackend( 5213): Added:'GetListItemProperties', with key:'get_list_item_properties'

I/Choreographer(  997): Skipped 30 frames!  The application may be doing too much work on its main thread.

I/InstrumentationBackend( 5213): Added:'GetListItemText', with key:'get_list_item_text'

I/InstrumentationBackend( 5213): Added:'LongPressListItems', with key:'long_press_list_item'

I/InstrumentationBackend( 5213): Added:'PressListItems', with key:'press_list_item'

I/InstrumentationBackend( 5213): Added:'FakeGPSLocation', with key:'set_gps_coordinates'

I/InstrumentationBackend( 5213): Added:'GetMapBounds', with key:'get_map_bounds'

I/InstrumentationBackend( 5213): Added:'GetMapCenter', with key:'get_map_center'

I/InstrumentationBackend( 5213): Added:'GetMapMarker', with key:'get_map_marker'

I/InstrumentationBackend( 5213): Added:'GetMapMarkers', with key:'get_map_markers'

I/InstrumentationBackend( 5213): Added:'GetMapZoom', with key:'get_map_zoom'

I/InstrumentationBackend( 5213): Added:'PanMapTo', with key:'pan_map_to'

I/InstrumentationBackend( 5213): Added:'SetMapCenter', with key:'set_map_center'

I/InstrumentationBackend( 5213): Added:'SetMapZoom', with key:'set_map_zoom'

I/InstrumentationBackend( 5213): Added:'TapAwayFromMarkers', with key:'tap_map_away_from_markers'

I/InstrumentationBackend( 5213): Added:'TapMapMarker', with key:'tap_map_marker_by_title'

I/InstrumentationBackend( 5213): Added:'ScrollDown', with key:'scroll_down'

I/InstrumentationBackend( 5213): Added:'ScrollUp', with key:'scroll_up'

I/InstrumentationBackend( 5213): Added:'EnterQueryByIndex', with key:'enter_query_into_numbered_field'

I/InstrumentationBackend( 5213): Added:'DownKey', with key:'send_key_down'

I/InstrumentationBackend( 5213): Added:'EnterKey', with key:'send_key_enter'

I/InstrumentationBackend( 5213): Added:'GoBack', with key:'go_back'

I/InstrumentationBackend( 5213): Added:'PressMenu', with key:'press_menu'

I/InstrumentationBackend( 5213): Added:'SelectFromMenuByText', with key:'select_from_menu'

I/InstrumentationBackend( 5213): Added:'GetSelectedSpinnerItemText', with key:'get_selected_spinner_item_text'

I/InstrumentationBackend( 5213): Added:'SelectSpinnerItemByContentDescription', with key:'select_item_from_named_spinner'

I/InstrumentationBackend( 5213): Added:'AssertGridViewContainsNoDuplicates', with key:'assert_no_duplicates_in_grid'

I/InstrumentationBackend( 5213): Added:'AssertText', with key:'assert_text'

I/InstrumentationBackend( 5213): Added:'AssertTextOfSpecificTextViewByContentDescription', with key:'assert_text_in_textview'

I/InstrumentationBackend( 5213): Added:'ClearTextById', with key:'clear_id_field'

I/InstrumentationBackend( 5213): Added:'ClearTextByIndex', with key:'clear_numbered_field'

I/InstrumentationBackend( 5213): Added:'ClearTextFieldByContentDescription', with key:'clear_named_field'

I/InstrumentationBackend( 5213): Added:'ClickOnText', with key:'click_on_text'

I/InstrumentationBackend( 5213): Added:'EnterTextByContentDescription', with key:'enter_text_into_named_field'

I/InstrumentationBackend( 5213): Added:'EnterTextById', with key:'enter_text_into_id_field'

I/InstrumentationBackend( 5213): Added:'EnterTextByIndex', with key:'enter_text_into_numbered_field'

I/InstrumentationBackend( 5213): Added:'GetTextById', with key:'get_text_by_id'

I/InstrumentationBackend( 5213): Added:'SetDateByContentDescription', with key:'set_date_with_description'

I/InstrumentationBackend( 5213): Added:'SetDateByIndex', with key:'set_date_with_index'

I/InstrumentationBackend( 5213): Added:'SetTimeByContentDescription', with key:'set_time_with_description'

I/InstrumentationBackend( 5213): Added:'SetTimeByIndex', with key:'set_time_with_index'

I/InstrumentationBackend( 5213): Added:'WaitForViewById', with key:'wait_for_view_by_id'

I/InstrumentationBackend( 5213): Added:'GetViewProperty', with key:'get_view_property'

I/InstrumentationBackend( 5213): Added:'AssertViewProperty', with key:'assert_view_property'

I/InstrumentationBackend( 5213): Added:'ClickOnViewByDescription', with key:'click_on_view_by_description'

I/InstrumentationBackend( 5213): Added:'ClickOnViewById', with key:'click_on_view_by_id'

I/InstrumentationBackend( 5213): Added:'GetActivityName', with key:'get_activity_name'

I/InstrumentationBackend( 5213): Added:'HasView', with key:'has_view'

I/InstrumentationBackend( 5213): Added:'IsCurrentActivityFocused', with key:'is_current_activity_focused'

I/InstrumentationBackend( 5213): Added:'IsEnabled', with key:'is_enabled'

I/InstrumentationBackend( 5213): Added:'LongPressOnViewById', with key:'long_press_on_view_by_id'

I/InstrumentationBackend( 5213): Added:'Press', with key:'press'

I/InstrumentationBackend( 5213): Added:'SelectTab', with key:'select_tab'

I/InstrumentationBackend( 5213): Added:'Wait', with key:'wait'

I/InstrumentationBackend( 5213): Added:'WaitForDialogClose', with key:'wait_for_dialog_to_close'

I/InstrumentationBackend( 5213): Added:'WaitForProgress', with key:'wait_for_no_progress_bars'

I/InstrumentationBackend( 5213): Added:'WaitForScreen', with key:'wait_for_screen'

I/InstrumentationBackend( 5213): Added:'WaitForTab', with key:'wait_for_tab'

I/InstrumentationBackend( 5213): Added:'WaitForText', with key:'wait_for_text'

I/InstrumentationBackend( 5213): Added:'WaitForView', with key:'wait_for_view'

I/InstrumentationBackend( 5213): Added:'DumpBodyHtml', with key:'dump_body_html'

I/InstrumentationBackend( 5213): Added:'DumpHtml', with key:'dump_html'

I/InstrumentationBackend( 5213): Added:'EnterTextByCssSelector', with key:'enter_text_by_selector'

I/InstrumentationBackend( 5213): Added:'ExecuteAsyncJavascript', with key:'execute_async_javascript'

I/InstrumentationBackend( 5213): Added:'ExecuteJavascript', with key:'execute_javascript'

I/InstrumentationBackend( 5213): Added:'GetLoadProgress', with key:'get_load_progress'

I/InstrumentationBackend( 5213): Added:'GetUrl', with key:'get_url'

I/InstrumentationBackend( 5213): Added:'PressByCssSelector', with key:'click_by_selector'

I/InstrumentationBackend( 5213): Added:'Query', with key:'query'

I/InstrumentationBackend( 5213): Added:'ScrollTo', with key:'scroll_to'

I/InstrumentationBackend( 5213): Added:'SetPropertyByCssSelector', with key:'set_property_by_css_selector'

I/InstrumentationBackend( 5213): Added:'SetText', with key:'set_text'

I/InstrumentationBackend( 5213): Added:'Touch', with key:'touch'

I/System.out( 5213): URI: /ping

I/System.out( 5213): URI: /

I/System.out( 5213): header: {content-type=application/json, user-agent=python-requests/1.1.0 CPython/2.7.3 Windows/XP, accept-encoding=gzip, deflate, compress, host=localhost:34777, accept=*/*, content-length=58}

I/System.out( 5213): params: {json={"command": "assert_text", "arguments": ["Hoschi", false]}

I/System.out( 5213): }

I/System.out( 5213): files: {}

I/System.out( 5213): command: {"command": "assert_text", "arguments": ["Hoschi", false]}

D/dalvikvm( 5213): GC_CONCURRENT freed 377K, 5% free 8642K/9095K, paused 21ms+4ms, total 62ms

I/InstrumentationBackend( 5213): Got command:'Command:'Line:null,assert_text', arguments:'[Hoschi, false]'

D/dalvikvm( 5213): GC_CONCURRENT freed 392K, 6% free 8670K/9159K, paused 19ms+3ms, total 56ms

I/System.out( 5213): result:{"bonusInformation":[],"message":"","success":true}

I/System.out( 5213): URI: /kill

I/System.out( 5213): Stopping test server

W/WindowManager(  997): Failure taking screenshot for (246x410) to layer 21010

I/Choreographer(  997): Skipped 30 frames!  The application may be doing too much work on its main thread.

I/Choreographer( 1306): Skipped 33 frames!  The application may be doing too much work on its main thread.

I/Choreographer( 1306): Skipped 30 frames!  The application may be doing too much work on its main thread.

W/ActivityManager(  997): Duplicate finish request for ActivityRecord{b5b02778 com.example.android.backuprestore/.BackupRestoreActivity}

D/AndroidRuntime( 5235): 

D/AndroidRuntime( 5235): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<

D/AndroidRuntime( 5235): CheckJNI is ON

D/dalvikvm( 5235): Trying to load lib libjavacore.so 0x0

D/dalvikvm( 5235): Added shared lib libjavacore.so 0x0

I/Choreographer(  997): Skipped 37 frames!  The application may be doing too much work on its main thread.

D/dalvikvm( 5235): Trying to load lib libnativehelper.so 0x0

I/Choreographer( 5213): Skipped 46 frames!  The application may be doing too much work on its main thread.

D/dalvikvm( 5235): Added shared lib libnativehelper.so 0x0

W/InputDispatcher(  997): Permission denied: injecting event from pid 5213 uid 10043 to window Window{b5a71cd0 com.android.launcher/com.android.launcher2.Launcher paused=false} owned by uid 10015

W/InputManager(  997): Input event injection from pid 5213 permission denied.

I/AndroidRuntime( 5213): VM exiting with result code 0, cleanup skipped.

I/WindowState(  997): WIN DEATH: Window{b5a6bfc8 com.example.android.backuprestore/com.example.android.backuprestore.BackupRestoreActivity paused=false}

I/ActivityManager(  997): Process com.example.android.backuprestore (pid 5213) has died.

W/ActivityManager(  997): Crash of app com.example.android.backuprestore running instrumentation ComponentInfo{sh.calaba.android.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner}

I/ActivityManager(  997): Force stopping package com.example.android.backuprestore uid=10043

I/Choreographer(  997): Skipped 57 frames!  The application may be doing too much work on its main thread.

D/AndroidRuntime( 5203): Shutting down VM

D/dalvikvm( 5203): GC_CONCURRENT freed 100K, 79% free 449K/2048K, paused 2ms+3ms, total 23ms

I/Choreographer(  997): Skipped 31 frames!  The application may be doing too much work on its main thread.

D/AndroidRuntime( 5235): Calling main entry com.android.commands.input.Input

I/Input   ( 5235): InjectKeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MENU, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=1248687, downTime=1248687, deviceId=-1, source=0x101 }

I/Input   ( 5235): InjectKeyEvent: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MENU, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=1248687, downTime=1248687, deviceId=-1, source=0x101 }

D/AndroidRuntime( 5235): Shutting down VM

D/dalvikvm( 5235): GC_CONCURRENT freed 100K, 79% free 439K/2048K, paused 0ms+2ms, total 32ms

I/Choreographer( 1306): Skipped 365 frames!  The application may be doing too much work on its main thread.

D/AndroidRuntime( 5255): 

D/AndroidRuntime( 5255): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<

D/AndroidRuntime( 5255): CheckJNI is ON

D/dalvikvm( 5255): Trying to load lib libjavacore.so 0x0

D/dalvikvm( 5255): Added shared lib libjavacore.so 0x0

D/dalvikvm( 5255): Trying to load lib libnativehelper.so 0x0

D/dalvikvm( 5255): Added shared lib libnativehelper.so 0x0

D/AndroidRuntime( 5255): Calling main entry com.android.commands.am.Am

I/ActivityManager(  997): Force stopping package com.example.android.backuprestore uid=10043

I/ActivityManager(  997): Start proc com.example.android.backuprestore for added application com.example.android.backuprestore: pid=5265 uid=10043 gids={3003, 1028}

D/dalvikvm( 5265): Not late-enabling CheckJNI (already on)

I/dalvikvm( 5265): Turning on JNI app bug workarounds for target SDK version 8...

E/Trace   ( 5265): error opening trace file: No such file or directory (2)

I/System.out( 5265): Calabash did not load Mono. This is only a problem if you are trying to test a Mono application

I/TestRunner( 5265): started: testHook(sh.calaba.instrumentationbackend.InstrumentationBackend)

I/ActivityManager(  997): START {act=android.intent.action.MAIN flg=0x10000000 cmp=com.example.android.backuprestore/.BackupRestoreActivity u=0} from pid 5265

W/WindowManager(  997): Failure taking screenshot for (246x410) to layer 21010

D/dalvikvm( 5265): GC_CONCURRENT freed 257K, 4% free 8121K/8455K, paused 19ms+3ms, total 94ms

I/Choreographer(  997): Skipped 50 frames!  The application may be doing too much work on its main thread.

V/BRActivity( 5265): datafile exists

V/BRActivity( 5265):   mayo=false tomato=false filling=2130968579

V/PhoneStatusBar( 1210): setLightsOn(true)

I/Choreographer(  997): Skipped 381 frames!  The application may be doing too much work on its main thread.

I/Choreographer( 5265): Skipped 392 frames!  The application may be doing too much work on its main thread.

D/gralloc_goldfish( 5265): Emulator without GPU emulation detected.

I/ActivityManager(  997): Displayed com.example.android.backuprestore/.BackupRestoreActivity: +2s225ms

D/dalvikvm( 5265): GC_FOR_ALLOC freed 14K, 3% free 8512K/8711K, paused 25ms, total 48ms

I/System.out( 5265): URI: /ping

I/System.out( 5265): URI: /

I/System.out( 5265): header: {content-type=application/json, user-agent=python-requests/1.1.0 CPython/2.7.3 Windows/XP, accept-encoding=gzip, deflate, compress, host=localhost:34777, accept=*/*, content-length=53}

I/System.out( 5265): params: {json={"command": "click_on_text", "arguments": ["Hummus"]}

I/System.out( 5265): }

I/System.out( 5265): files: {}

I/System.out( 5265): command: {"command": "click_on_text", "arguments": ["Hummus"]}

I/InstrumentationBackend( 5265): Got command:'Command:'Line:null,click_on_text', arguments:'[Hummus]'

W/System.err( 5265): java.lang.NullPointerException

W/System.err( 5265):    at sh.calaba.instrumentationbackend.Command.execute(Command.java:46)

W/System.err( 5265):    at sh.calaba.instrumentationbackend.actions.HttpServer.runCommand(HttpServer.java:158)

W/System.err( 5265):    at sh.calaba.instrumentationbackend.actions.HttpServer.serve(HttpServer.java:114)

W/System.err( 5265):    at sh.calaba.instrumentationbackend.actions.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:412)

W/System.err( 5265):    at java.lang.Thread.run(Thread.java:856)

D/dalvikvm( 5265): GC_CONCURRENT freed 378K, 5% free 8612K/9031K, paused 22ms+40ms, total 117ms

I/System.out( 5265): result:{"bonusInformation":["Exception stack trace:\njava.lang.NullPointerException\n\tat sh.calaba.instrumentationbackend.Command.execute(Command.java:46)\n\tat sh.calaba.instrumentationbackend.actions.HttpServer.runCommand(HttpServer.java:158)\n\tat sh.calaba.instrumentationbackend.actions.HttpServer.serve(HttpServer.java:114)\n\tat sh.calaba.instrumentationbackend.actions.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:412)\n\tat java.lang.Thread.run(Thread.java:856)\n"],"message":null,"success":false}

I/System.out( 5265): URI: /kill

I/System.out( 5265): Stopping test server

E/dalvikvm( 5265): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.jayway.android.robotium.solo.Waiter.getSupportFragment

W/dalvikvm( 5265): VFY: unable to resolve check-cast 47 (Landroid/support/v4/app/FragmentActivity;) in Lcom/jayway/android/robotium/solo/Waiter;

D/dalvikvm( 5265): VFY: replacing op
peritus commented 11 years ago

Hey. This seems to be related to a breaking change in the python-requests API we're using underneath (see http://blog.lumino.so/2013/01/04/how-to-make-an-orderly-transition-to-python-requests-1-0-instead-of-running-around-in-a-panic/)

For the meantime, you could try downgrading "requests" to an earlier version, but will provide a fix to this library soon.

peritus commented 11 years ago

Note to self: Also answer this question after the fix is on PyPI: http://stackoverflow.com/questions/13955485/robot-framework-androidlibrary-screen-should-contain-text-return-error

peritus commented 11 years ago

Also: Is this hummus app available yet somewhere ? I like hummus!

sps7 commented 11 years ago

I m working on BackupRestoreActivity.apk

and what is command to downgrade 'requests'

sps7 commented 11 years ago

how to do downgrading "requests" to an earlier version?

sps7 commented 11 years ago

I installed requests 0.14.2 and got below error:

Test Execution Errors 20130122 16:22:40.656 WARN << u'http://localhost:34777/' 20130122 16:22:40.656 WARN << u'{"bonusInformation":[],"message":"","success":true}' 20130122 16:22:50.375 WARN << u'http://localhost:34777/' 20130122 16:22:50.375 WARN << u'{"bonusInformation":["Exception stack trace:\njava.lang.NullPointerException\n\tat sh.calaba.instrumentationbackend.Command.execute(Command.java:46)\n\tat sh.calaba.instrumentationbackend.actions.HttpServer.runCommand(HttpServer.java:158)\n\tat sh.calaba.instrumentationbackend.actions.HttpServer.serve(HttpServer.java:114)\n\tat sh.calaba.instrumentationbackend.actions.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:412)\n\tat java.lang.Thread.run(Thread.java:856)\n"],"message":null,"success":false}' 20130122 16:23:05.203 WARN << u'http://localhost:34777/' 20130122 16:23:05.218 WARN << u'{"bonusInformation":[],"message":"","success":true}' 20130122 16:23:05.375 WARN Could not stop Android Emulator: It was not started.

KEYWORD: AndroidLibrary.Screen Should Contain Hummus Expand All Documentation: Asserts that the current screen contains a given text

Start / End / Elapsed: 20130122 16:22:35.343 / 20130122 16:22:40.656 / 00:00:05.313 16:22:35.343 TRACE Arguments: [ u'Hummus' ] 16:22:35.343 DEBUG Test timeout 10 minutes active. 588.719 seconds left. 16:22:35.343 DEBUG >> '{"command": "assert_text", "arguments": ["Hummus", true]}' 16:22:35.343 DEBUG >> () {'headers': {'Content-Type': 'application/json'}, 'data': '{"command": "assert_text", "arguments": ["Hummus", true]}'} 16:22:35.343 INFO Starting new HTTP connection (1): localhost 16:22:40.500 DEBUG "POST / HTTP/1.1" 200 None 16:22:40.656 WARN << u'http://localhost:34777/' 16:22:40.656 WARN << u'{"bonusInformation":[],"message":"","success":true}' 16:22:40.656 FAIL TypeError: 'instancemethod' object has no attribute 'getitem' 16:22:40.656 DEBUG Traceback (most recent call last): File "C:\Python27\lib\site-packages\AndroidLibraryinit.py", line 465, in screen_should_contain assert result["success"] is True, "Screen does not contain text '%s': %s" % (

sps7 commented 11 years ago

Someone please reply

peritus commented 11 years ago

Will reply when there is time for it.

sps7 commented 11 years ago

Issue got resolved after installing requests==0.14.2 using pip.

tonymontgomery commented 11 years ago
http://blog.lumino.so/2013/01/04/how-to-make-an-orderly-transition-to-python-requests-1-0-instead-of-running-around-in-a-panic/#comment-652