#獲取設置欄所有標題的文本內容
eles = driver.find_elements_by_id("com.android.settings:id/title")
for i in eles:
print(i.text)
#獲取放大鏡的位置
search_button = driver.find_element_by_id("com.android.settings:id/search")
print("---位置:")
print(search_button.location)
print("---坐標:")
print(search_button.size)
---位置:
{'x': 1248, 'y': 112}-----------------------------黃色部分
---坐標:
{'height': 192, 'width': 192}------------------綠色部分