AndroidViewClient
AndroidViewClient copied to clipboard
No 'clickable' attribute in Views returned from viewserver
Hi, We are trying to run apps via AndroidViewClient on multiple versions of Android (10,15,16,17,18) We noticed that the library now uses UIAutomator for more recent versions of Android, but on some emulator images, won't run due to the missing [ command. When we force ViewServer use, however, we seem to lose the ability to get the 'clickable' attribute stored in a View's map. This is really helpful for automated testing. Is there a way to get that same functionality out of ViewServer?
View.isClickable() works both for UiAutomator and ViewServer (including LocalViewServer) so you won't have problems.
For example:
# class=android.widget.EditText
no_id16 = vc.findViewByIdOrRaise("id/no_id/16")
print "clickable:", no_id16.isClickable()