Waiting for a specific view on androidviewclient

Deadly 提交于 2019-12-24 10:46:33

问题


I am using androidviewclient from dtmilano and it works great.

I need to know how do I wait for a specific view to appear on the screen and then take an action ?

I am using getandroidview() but not able to understand its correct implementation.

Please help me regarding this.


回答1:


The simplest way would be:

...
while True:
    vc.dump()
    if vc.findViewWithText('Hello World!'):
        # do something
        pass
    else:
        time.sleep(5)


来源:https://stackoverflow.com/questions/25729366/waiting-for-a-specific-view-on-androidviewclient

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!