修复转发
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
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user