feat: add automation scripts, XML parsing logic for UI element identification, and supplementary asset images
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
tree = ET.parse('ui_dump.xml')
|
||||
for node in tree.iter():
|
||||
if node.attrib.get('clickable') == 'true' and node.attrib.get('package') == 'com.shopee.vn':
|
||||
clazz = node.attrib.get('class', '')
|
||||
res_id = node.attrib.get('resource-id', '')
|
||||
text = node.attrib.get('text', '')
|
||||
desc = node.attrib.get('content-desc', '')
|
||||
bounds = node.attrib.get('bounds', '')
|
||||
print(f"{clazz} | {res_id} | text:{text} | desc:{desc} | bounds:{bounds}")
|
||||
Reference in New Issue
Block a user