dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.61k stars 344 forks source link

How to get pop-up messages in app #302

Closed zhangwenting0224 closed 2 years ago

zhangwenting0224 commented 2 years ago

I'm so sorry to disturb you again After searching many documents and stack overflow, the problem still exists.

After clicking some button, a pop-up message will appear in the view. I try to use vc.dump(), but I can't seem to get it? How can I get the messaage? He will disappear soo

device.press("KEYCODE_BACK") vc.dump() vc.traverse(transform=ViewClient.TRAVERSE_CIT, stream=sys.stdout)

sp220220_164143 n

dtmilano commented 2 years ago

Is it a Toast?

zhangwenting0224 commented 2 years ago

是吐司吗?

Yes, how can I get it?

dtmilano commented 2 years ago

The latest version of CulebraTester2-public includes an endpoint to wait for a Toast.

Screen Shot 2022-02-27 at 18 42 44

You can try that. CulebraTester2-public can be used as an AndroidViewClient backend when you specify useuiautomatorhelper=True creating the ViewClient object.

dtmilano commented 2 years ago

Was that helpful?