20250904-初步功能已完成
This commit is contained in:
@@ -58,6 +58,8 @@ class ControlUtils(object):
|
||||
back = session.xpath(
|
||||
"//*[@label='返回']"
|
||||
" | "
|
||||
"//*[@label='返回上一屏幕']"
|
||||
" | "
|
||||
"//XCUIElementTypeButton[@visible='true' and @name='TTKProfileNavBarBaseItemComponent' and @label='IconChevronLeftOffsetLTR']"
|
||||
)
|
||||
|
||||
@@ -125,8 +127,9 @@ class ControlUtils(object):
|
||||
videoCell = session.xpath(
|
||||
'(//XCUIElementTypeCollectionView//XCUIElementTypeCell[.//XCUIElementTypeImage[@name="profile_video"]])[1]')
|
||||
|
||||
tab = session.xpath('//XCUIElementTypeButton[@name="TTKProfileTabVideoButton_0"]').get(timeout=2)
|
||||
# 某些版本 tab.value 可能就是数量;或者 tab.label 类似 “作品 7”
|
||||
tab = session.xpath(
|
||||
'//XCUIElementTypeButton[@name="TTKProfileTabVideoButton_0" or contains(@label,"作品") or contains(@name,"作品")]'
|
||||
).get(timeout=5) # 某些版本 tab.value 可能就是数量;或者 tab.label 类似 “作品 7”
|
||||
m = re.search(r"\d+", tab.label)
|
||||
|
||||
num = 0
|
||||
|
||||
Reference in New Issue
Block a user