This commit is contained in:
shikong 2024-08-28 02:36:27 +08:00
parent 691dbdd7b2
commit 1ad2dc52be
Signed by: Shikong
GPG Key ID: BD85FF18B373C341

View File

@ -2,9 +2,11 @@ from uiautomator2 import Device
def click_search_icon(d: Device): def click_search_icon(d: Device):
(d selector = d.xpath('//*[@resource-id="com.ss.android.ugc.aweme:id/ybv"]/android.widget.Button['
.xpath('//*[@resource-id="com.ss.android.ugc.aweme:id/ybv"]/android.widget.Button[1]/android.widget.FrameLayout[1]') '1]/android.widget.FrameLayout[1]')
.click()) if selector.exists:
selector.click()
def input_search_text(d: Device, text: str): def input_search_text(d: Device, text: str):
(d (d