Skip to content

Commit

Permalink
Add wait for new toast example
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmilano committed Feb 28, 2022
1 parent e4a0af9 commit 25d2734
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions examples/wait-for-new-toast-uiautomator-helper
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

try:
import os
import sys
sys.path.insert(0, os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src'))
except:
pass

from com.dtmilano.android.viewclient import ViewClient

vc = ViewClient(*ViewClient.connectToDeviceOrExit(), useuiautomatorhelper=True)

print(vc.uiAutomatorHelper.device.wait_for_new_toast(timeout=10000))

0 comments on commit 25d2734

Please sign in to comment.