Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get android page resource by stf #796

Open
amoxuk opened this issue Jul 17, 2024 · 6 comments
Open

how to get android page resource by stf #796

amoxuk opened this issue Jul 17, 2024 · 6 comments

Comments

@amoxuk
Copy link

amoxuk commented Jul 17, 2024

Describe the solution you'd like

I want to get the android page resource by stf, is there any api to make it ? or minicap? otherwise I will make it by appium.

@denis99999
Copy link

@amoxuk , I don't understand, can you detail your question ?

@csdaa
Copy link

csdaa commented Jul 22, 2024

image

He needs to get the xml structure of the page layout, similar to the file generated by the "UI Automator Viewer". Someone pushed this feature a few years ago, but it was rejected because of non-standard coding.Right? @amoxuk

@amoxuk
Copy link
Author

amoxuk commented Jul 23, 2024

image

He needs to get the xml structure of the page layout, similar to the file generated by the "UI Automator Viewer". Someone pushed this feature a few years ago, but it was rejected because of non-standard coding.Right? @amoxuk

completely right! thank you!

@csdaa
Copy link

csdaa commented Jul 23, 2024

image
He needs to get the xml structure of the page layout, similar to the file generated by the "UI Automator Viewer". Someone pushed this feature a few years ago, but it was rejected because of non-standard coding.Right? @amoxuk

completely right! thank you!

I developed this feature during business hours, so I can't expose the code to you, or if you look for a record of a pull request before STF. My thoughts:

  1. Take a screenshot through the virtual screen of STF
  2. Get the XML of the page through ADB and store it in TMP, and then read the XML file just saved

@amoxuk
Copy link
Author

amoxuk commented Jul 25, 2024

@csdaa it's too slow by adb dump&read. I had verified this method. So I want some efficient method.

@csdaa
Copy link

csdaa commented Aug 20, 2024

@csdaa it's too slow by adb dump&read. I had verified this method. So I want some efficient method.

try this uiautomator dump /data/local/tmp/uidump.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants