Skip to main content

ADB uiautomator dump to Pandas DataFrame

Project description

Use Pandas for a better ADB automation

Tested with Windows 10 / Bluestacks 5 / Python 3.9.13

$pip install a-pandas-ex-uiautomator-to-df



from a_pandas_ex_uiautomator_to_df import pd_add_uiautomator_to_df

import pandas as pd

pd_add_uiautomator_to_df()



dumpstring=subprocess.run(r'adb shell uiautomator dump && adb shell cat /sdcard/window_dump.xml',shell=True,capture_output=True)

#or dumpstring=subprocess.run(r'adb shell cat /sdcard/window_dump.xml',shell=True,capture_output=True) 

df = pd.Q_uiautomator_to_df(dumpstring.stdout) #string or bytes



    aa_center_x  aa_center_y  aa_end_x  aa_end_y  aa_height  aa_start_x  aa_start_y  aa_width                bounds  checkable  checked                        class  clickable content-desc  enabled  focusable  focused  index                                                                                          keys_hierarchy  long-clickable                  package  password  position_0  position_0_h  position_1  position_1_h  position_2  position_2_h  position_3  position_3_h  position_4  position_4_h  position_5  position_5_h                                      resource-id  scrollable  selected                            text

0           480          186       940       353        333          20          20       920    (20, 20, 940, 353)      False    False                      a.n.a.b      False                  True       True    False      0                                                  (node, node, node, node, node, node, node, 1, node, 0)           False  com.bluestacks.launcher     False           7             1           9             0        <NA>          <NA>        <NA>          <NA>        <NA>          <NA>        <NA>          <NA>               com.bluestacks.launcher:id/desktop       False     False                                

1           480          470       843       540        140         118         400       725  (118, 400, 843, 540)      False    False  android.widget.LinearLayout      False                  True      False    False      3                                                  (node, node, node, node, node, node, node, 1, node, 1)           False  com.bluestacks.launcher     False           7             1           9             1        <NA>          <NA>        <NA>          <NA>        <NA>          <NA>        <NA>          <NA>                  com.bluestacks.launcher:id/dock       False     False                                

2           480          186       940       353        333          20          20       920    (20, 20, 940, 353)      False    False       android.view.ViewGroup      False                  True      False    False      0                                            (node, node, node, node, node, node, node, 1, node, 0, node)           False  com.bluestacks.launcher     False           7             1           9             0        <NA>          <NA>        <NA>          <NA>        <NA>          <NA>        <NA>          <NA>                                                        False     False                                

3           480          412       843       419         13         118         406       725  (118, 406, 843, 419)      False    False      android.widget.TextView      False                  True      False    False      0                                         (node, node, node, node, node, node, node, 1, node, 1, node, 0)           False  com.bluestacks.launcher     False           7             1           9             1          11             0        <NA>          <NA>        <NA>          <NA>        <NA>          <NA>           com.bluestacks.launcher:id/popular_gam       False     False      BELIEBTE GAMES ZUM SPIELEN

4           480          479       843       540        121         118         419       725  (118, 419, 843, 540)      False    False   android.widget.FrameLayout      False                  True      False    False      1                                         (node, node, node, node, node, node, node, 1, node, 1, node, 1)           False  com.bluestacks.launcher     False           7             1           9             1          11             1        <NA>          <NA>        <NA>          <NA>        <NA>          <NA>           com.bluestacks.launcher:id/frameLayout       False     False                                

5           480          479       843       540        121         118         419       725  (118, 419, 843, 540)      False    False   android.widget.FrameLayout      False                  True      False    False      0                                (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0        <NA>          <NA>        <NA>          <NA>                                                        False     False                                

6           480          505       843       540         70         118         470       725  (118, 470, 843, 540)      False    False            android.view.View      False                  True      False    False      1                                (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 1)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             1        <NA>          <NA>        <NA>          <NA>        com.bluestacks.launcher:id/viewBackground       False     False                                

7           480          472       806       525        106         155         419       651  (155, 419, 806, 525)      False    False  android.widget.LinearLayout      False                  True      False    False      0                          (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0        <NA>          <NA>        <NA>          <NA>   com.bluestacks.launcher:id/allappsLinearLayout       False     False                                

8           243          472       291       525        106         195         419        96  (195, 419, 291, 525)      False    False  android.widget.LinearLayout       True                  True      False    False      0                 (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 0)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             0        <NA>          <NA>    com.bluestacks.launcher:id/appOneLinearLayout       False     False                                

9           338          472       386       525        106         291         419        95  (291, 419, 386, 525)      False    False  android.widget.LinearLayout       True                  True      False    False      1                 (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 1)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             1        <NA>          <NA>    com.bluestacks.launcher:id/appTwoLinearLayout       False     False                                

10          433          472       481       525        106         386         419        95  (386, 419, 481, 525)      False    False  android.widget.LinearLayout       True                  True      False    False      2                 (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 2)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             2        <NA>          <NA>  com.bluestacks.launcher:id/appThreeLinearLayout       False     False                                

11          528          472       576       525        106         481         419        95  (481, 419, 576, 525)      False    False  android.widget.LinearLayout       True                  True      False    False      3                 (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 3)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             3        <NA>          <NA>   com.bluestacks.launcher:id/appFourLinearLayout       False     False                                

12          623          472       671       525        106         576         419        95  (576, 419, 671, 525)      False    False  android.widget.LinearLayout       True                  True      False    False      4                 (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 4)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             4        <NA>          <NA>   com.bluestacks.launcher:id/appFiveLinearLayout       False     False                                

13          718          472       766       525        106         671         419        95  (671, 419, 766, 525)      False    False  android.widget.LinearLayout       True                  True      False    False      5                 (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 5)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             5        <NA>          <NA>    com.bluestacks.launcher:id/appSixLinearLayout       False     False                                

14          243          461       273       491         60         213         431        60  (213, 431, 273, 491)      False    False   android.widget.FrameLayout      False                  True      False    False      0        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 0, node, 0)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             0          18             0         com.bluestacks.launcher:id/app_image_one       False     False                                

15          243          510       291       525         29         195         496        96  (195, 496, 291, 525)      False    False      android.widget.TextView      False                  True      False    False      1        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 0, node, 1)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             0          18             1          com.bluestacks.launcher:id/app_name_one       False     False   State of Survival: Zombie War

16          338          510       386       525         29         291         496        95  (291, 496, 386, 525)      False    False      android.widget.TextView      False                  True      False    False      1        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 1, node, 1)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             1          18             1          com.bluestacks.launcher:id/app_name_two       False     False                     World War 3

17          433          461       463       491         60         403         431        60  (403, 431, 463, 491)      False    False   android.widget.FrameLayout      False                  True      False    False      0        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 2, node, 0)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             2          18             0       com.bluestacks.launcher:id/app_image_three       False     False                                

18          433          510       481       525         29         386         496        95  (386, 496, 481, 525)      False    False      android.widget.TextView      False                  True      False    False      1        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 2, node, 1)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             2          18             1        com.bluestacks.launcher:id/app_name_three       False     False                     Idle Heroes

19          528          461       558       491         60         498         431        60  (498, 431, 558, 491)      False    False   android.widget.FrameLayout      False                  True      False    False      0        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 3, node, 0)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             3          18             0        com.bluestacks.launcher:id/app_image_four       False     False                                

20          528          510       576       525         29         481         496        95  (481, 496, 576, 525)      False    False      android.widget.TextView      False                  True      False    False      1        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 3, node, 1)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             3          18             1         com.bluestacks.launcher:id/app_name_four       False     False  Blade of Chaos: Immortal Titan

21          623          461       653       491         60         593         431        60  (593, 431, 653, 491)      False    False   android.widget.FrameLayout      False                  True      False    False      0        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 4, node, 0)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             4          18             0        com.bluestacks.launcher:id/app_image_five       False     False                                

22          623          510       671       525         29         576         496        95  (576, 496, 671, 525)      False    False      android.widget.TextView      False                  True      False    False      1        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 4, node, 1)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             4          18             1         com.bluestacks.launcher:id/app_name_five       False     False   Guild of Heroes: Rollenspiele

23          718          510       766       525         29         671         496        95  (671, 496, 766, 525)      False    False      android.widget.TextView      False                  True      False    False      1        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 5, node, 1)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             5          18             1          com.bluestacks.launcher:id/app_name_six       False     False                           Tibia

24          338          461       368       491         60         308         431        60  (308, 431, 368, 491)      False    False   android.widget.FrameLayout      False                  True      False    False      0        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 1, node, 0)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             1          18             0         com.bluestacks.launcher:id/app_image_two       False     False                                

25          718          461       748       491         60         688         431        60  (688, 431, 748, 491)      False    False   android.widget.FrameLayout      False                  True      False    False      0        (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 5, node, 0)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             5          18             0         com.bluestacks.launcher:id/app_image_six       False     False                                

26          359          440       366       447         14         352         433        14  (352, 433, 366, 447)      False    False     android.widget.ImageView      False                  True      False    False      0  (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 1, node, 0, node)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             1          18             0       com.bluestacks.launcher:id/popup_image_two       False     False                                

27          739          440       746       447         14         732         433        14  (732, 433, 746, 447)      False    False     android.widget.ImageView      False                  True      False    False      0  (node, node, node, node, node, node, node, 1, node, 1, node, 1, node, 0, node, node, 5, node, 0, node)           False  com.bluestacks.launcher     False           7             1           9             1          11             1          13             0          16             5          18             0       com.bluestacks.launcher:id/popup_image_six       False     False                                

 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

a_pandas_ex_uiautomator_to_df-0.10.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file a_pandas_ex_uiautomator_to_df-0.10.tar.gz.

File metadata

File hashes

Hashes for a_pandas_ex_uiautomator_to_df-0.10.tar.gz
Algorithm Hash digest
SHA256 a55bc5d678d8f3cc87a6b41dcb9728ed018d5326c8d66169a11c1d4fe92c0903
MD5 7a53a15d455158b09ee6352bb66f5374
BLAKE2b-256 a181ec4e5046be70600713d73933e12f8bd8255df73ac478af6f5c4fee59348a

See more details on using hashes here.

File details

Details for the file a_pandas_ex_uiautomator_to_df-0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for a_pandas_ex_uiautomator_to_df-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 7af6eb83177190ddc1be5e93d759354576aeac5c956db2895845cca395fb43b3
MD5 48913257ebeb90dc7b3c00962a328688
BLAKE2b-256 40405b087f89271944d2c0a03f630d6773668229bf8d3ed3a20224022a5ea2a4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page