dtmilano / CulebraTester2-public

CulebraTester: Snaky Android Testing
Apache License 2.0
139 stars 29 forks source link

Dump via adb #15

Closed neervanbiqs closed 1 year ago

neervanbiqs commented 1 year ago

Could you add the possibility to dump window via adb shell command like adb shell uiautomator dump?

dtmilano commented 1 year ago

If I understand correctly/uiDevice/dumpWindowHierarchy is what you are looking for.

Take a look at the API here.

Not sure why you mentioned adb shell though. You can use curl if you want to do it just from the command line or script.

Check https://github.com/dtmilano/CulebraTester2-public/blob/master/dump-window-hierarchy

neervanbiqs commented 1 year ago

curl is for linux and bash. I use windows and cmd

dtmilano commented 1 year ago

You can also use git-bash or curl on Windows.

dtmilano commented 1 year ago

Or any HTTP client you like or AndroidViewClient/culebra's dump -ah that does precisely that.

neervanbiqs commented 1 year ago

Is it possible to click button via curl?

dtmilano commented 1 year ago

Yes, it might be easier using python but you can definitely do it using just curl.

Take a look at https://github.com/dtmilano/CulebraTester2-public/blob/master/simple-calculator-test.

Using curl it: