test_watcher.py 325 B

12345678910111213141516
  1. # coding: utf-8
  2. #
  3. import uiautomator2 as u2
  4. def test_watch_context(dev: u2.Device):
  5. with dev.watch_context(builtin=True) as ctx:
  6. ctx.when("App").click()
  7. dev(text='Menu').click()
  8. assert dev(text='Inflate from XML').wait()
  9. def teardown_function(d: u2.Device):
  10. print("Teardown", d)