Kshitij Sharma
Kshitij Sharma

Reputation: 49

Waiting for a specific view on androidviewclient

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.

Upvotes: 1

Views: 475

Answers (1)

Diego Torres Milano
Diego Torres Milano

Reputation: 69358

The simplest way would be:

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

Upvotes: 2

Related Questions