修复转发
All checks were successful
Update Code / StopService (windows-101.36.104.175) (push) Successful in 0s
Update Code / StopService (windows-101.36.102.136) (push) Successful in 0s
Update Code / CD (windows-101.36.102.136) (push) Successful in 8s
Update Code / CD (windows-101.36.104.175) (push) Successful in 12s

This commit is contained in:
work
2026-04-10 22:42:01 +08:00
parent faae5d3ba8
commit b0f854ebdb
2 changed files with 14 additions and 11 deletions

View File

@@ -635,17 +635,20 @@ def _get_share_config(target_url):
def _click_share_button(page, selector):
locator = page.locator(selector)
count = locator.count()
deadline = time.time() + 120
for index in range(count):
candidate = locator.nth(index)
try:
if candidate.is_visible():
candidate.scroll_into_view_if_needed(timeout=30000)
candidate.click(timeout=60000)
return
except Error:
continue
while time.time() < deadline:
count = locator.count()
for index in range(count):
candidate = locator.nth(index)
try:
if candidate.is_visible():
candidate.scroll_into_view_if_needed(timeout=30000)
candidate.click(timeout=60000)
return
except Error:
continue
page.wait_for_timeout(1000)
element = page.query_selector(selector)
if element is None: