2013-06-04 4 views
0

나는 AndroidViewClient와 함께 monkeyrunner로 푸시 할 EditText 및 Button을 찾고 있습니다. 문제는 AndroidViewClient가 이러한 뷰의 좌표를 픽셀 단위로 가져올 수 없다는 것입니다. AndroidViewClient가보기의 좌표를 얻지 못합니다.

결과

은 다음을 말한다 :이 문제에 대한 해결책이

    com.android.launcher.BubbleTextView id/0x80203 Browser (0, 0) 
/opt/santoku/AndroidViewClient-master/AndroidViewClient/src/com/dtmilano/android/viewclient.py:488: UserWarning: View id/0x80002 has no 'layout:mLeft' property 
    warnings.warn("View %s has no '%s' property" % (self.getId(), self.leftProperty)) 
/opt/santoku/AndroidViewClient-master/AndroidViewClient/src/com/dtmilano/android/viewclient.py:511: UserWarning: View id/0x80002 has no 'layout:mTop' property 
    warnings.warn("View %s has no '%s' property" % (self.getId(), self.topProperty)) 
       com.android.launcher.BubbleTextView id/0x80002 Messaging (0, 0) 
/opt/santoku/AndroidViewClient-master/AndroidViewClient/src/com/dtmilano/android/viewclient.py:488: UserWarning: View id/cell3 has no 'layout:mLeft' property 
    warnings.warn("View %s has no '%s' property" % (self.getId(), self.leftProperty)) 
/opt/santoku/AndroidViewClient-master/AndroidViewClient/src/com/dtmilano/android/viewclient.py:511: UserWarning: View id/cell3 has no 'layout:mTop' property 
    warnings.warn("View %s has no '%s' property" % (self.getId(), self.topProperty)) 
      com.android.launcher.CellLayout id/cell3 None (0, 0) 
/opt/santoku/AndroidViewClient-master/AndroidViewClient/src/com/dtmilano/android/viewclient.py:488: UserWarning: View id/drawer has no 'layout:mLeft' property 
    warnings.warn("View %s has no '%s' property" % (self.getId(), self.leftProperty)) 
/opt/santoku/AndroidViewClient-master/AndroidViewClient/src/com/dtmilano/android/viewclient.py:511: UserWarning: View id/drawer has no 'layout:mTop' property 
    warnings.warn("View %s has no '%s' property" % (self.getId(), self.topProperty)) 
     android.widget.SlidingDrawer id/drawer None (0, 0) 
/opt/santoku/AndroidViewClient-master/AndroidViewClient/src/com/dtmilano/android/viewclient.py:488: UserWarning: View id/all_apps has no 'layout:mLeft' property 
    warnings.warn("View %s has no '%s' property" % (self.getId(), self.leftProperty)) 
/opt/santoku/AndroidViewClient-master/AndroidViewClient/src/com/dtmilano/android/viewclient.py:511: UserWarning: View id/all_apps has no 'layout:mTop' property 
    warnings.warn("View %s has no '%s' property" % (self.getId(), self.topProperty)) 
      com.android.launcher.HandleView id/all_apps None (0, 0) 
      com.android.launcher.AllAppsGridView id/content None (0, 0) 
/opt/santoku/AndroidViewClient-master/AndroidViewClient/src/com/dtmilano/android/viewclient.py:488: UserWarning: View id/name has no 'layout:mLeft' property 
    warnings.warn("View %s has no '%s' property" % (self.getId(), self.leftProperty)) 
/opt/santoku/AndroidViewClient-master/AndroidViewClient/src/com/dtmilano/android/viewclient.py:511: UserWarning: View id/name has no 'layout:mTop' property 
    warnings.warn("View %s has no '%s' property" % (self.getId(), self.topProperty)) 
       android.widget.TextView id/name Alarm Clock (0, 0) 
       android.widget.TextView id/name API Demos (0, 0) 
       android.widget.TextView id/name Browser (0, 0) 
       android.widget.TextView id/name Calculator (0, 0) 
       android.widget.TextView id/name Camera (0, 0) 
       android.widget.TextView id/name Contacts (0, 0) 
       android.widget.TextView id/name Custom Locale (0, 0) 
       android.widget.TextView id/name Dev Tools (0, 0) 
       android.widget.TextView id/name Email (0, 0) 
       android.widget.TextView id/name Gallery (0, 0) 
       android.widget.TextView id/name Gestures Builder (0, 0) 
       android.widget.TextView id/name Messaging (0, 0) 
       android.widget.TextView id/name Music (0, 0) 
       android.widget.TextView id/name Phone (0, 0) 
       android.widget.TextView id/name Settings (0, 0) 
       android.widget.TextView id/name Spare Parts (0, 0) 
     com.android.launcher.DeleteZone id/delete_zone None (0, 0) 

있습니까? 견해에 확실한 속성이 필요합니까?

도움 주셔서 감사합니다.

+0

에뮬레이터? 장치? 안드로이드 API 수준? androidviewclient 버전? 덤프를 가져 오는 데 사용되는 명령은 무엇입니까? –

+0

에뮬레이터 Nexus One은 Android Api 레벨 7 (Android 2.1)과 androidviewclient의 마지막 버전으로 어제 https://github.com/dtmilano/AndroidViewClient에서 다운로드했으며 덤프 예제를 사용했습니다. vc = ViewClient (* ViewClient .connectToDeviceOrExit (** kwargs1), ** kwargs2) vc.dump (window = options [WINDOW]) vc.traverse (transform = transform) – user2366903

답변

0

API 레벨 7 완전히 AndroidViewClient 지원하지만, 대부분의 기능이 API 레벨을 지원하는 8과 동일한 지 판명되지 않았다. 작은 수정으로 문제가 해결되었습니다.

최신 AndroidViewclient 버전 (2.3.20)을 사용해보세요. 괜찮을 것입니다.

+0

고맙습니다. 당신의 일과 응답에 감사드립니다. – user2366903

관련 문제