2024-08-01 21:58:33 +08:00
|
|
|
from uiautomator2 import Device
|
|
|
|
|
|
|
|
|
2024-08-01 22:20:29 +08:00
|
|
|
def click_search_icon(d: Device):
|
2024-08-01 21:58:33 +08:00
|
|
|
(d
|
|
|
|
.xpath('//*[@resource-id="com.ss.android.ugc.aweme:id/ybv"]/android.widget.Button[1]/android.widget.FrameLayout[1]')
|
|
|
|
.click())
|
2024-08-01 22:20:29 +08:00
|
|
|
|
|
|
|
def input_search_text(d: Device, text: str):
|
|
|
|
(d
|
|
|
|
.xpath('//*[@resource-id="com.ss.android.ugc.aweme:id/et_search_kw"]').set_text(text))
|