AndroidViewClient icon indicating copy to clipboard operation
AndroidViewClient copied to clipboard

ImageView Support

Open qingyuanxingsi opened this issue 10 years ago • 3 comments

During my use of AndroidViewClient, I've found that AndroidViewClient can not well support ImageView component?Can ImageView be supported?Or I did not use the tool properly?

qingyuanxingsi avatar Jun 03 '15 14:06 qingyuanxingsi

Please be more specific about the problem. Show some source code, expectation, results, etc. Also specify versions (AVC, android, etc.) and device.

dtmilano avatar Jun 03 '15 15:06 dtmilano

I'm using Google Nexus 6 for the testing. When running the following code:


    emu_name = 'ZX1G42967G'
    _device, _serialno = ViewClient.connectToDeviceOrExit(serialno=emu_name)
    viewClient = ViewClient(_device, _serialno)
    viewClient.traverse()

I cannot get most of the ImageView components in current view(while I can see the ImageView components by using uiautomatorviewer tool in Android sdk) The application for testing is Wandoujia which can be downloaded at http://www.wandoujia.com/, you can choose any comment activity of any application for testing use.

qingyuanxingsi avatar Jun 06 '15 11:06 qingyuanxingsi

You could try:

views = vc.findViewsWithAttribute('class', android.widget.ImageView)

And then do something like: views[0].touch()

Diob avatar Jan 12 '16 13:01 Diob