update: failed attempts markup
This commit is contained in:
@@ -330,14 +330,15 @@ def main():
|
|||||||
wait = WebDriverWait(driver, timeout=args.interval)
|
wait = WebDriverWait(driver, timeout=args.interval)
|
||||||
alert = wait.until(lambda x: x.find_element(By.CSS_SELECTOR, "div.io-ox-alert.io-ox-alert-error"))
|
alert = wait.until(lambda x: x.find_element(By.CSS_SELECTOR, "div.io-ox-alert.io-ox-alert-error"))
|
||||||
|
|
||||||
|
sents[current] = '❌'
|
||||||
message = alert.text.replace('\n', ' ')
|
message = alert.text.replace('\n', ' ')
|
||||||
if not message: print(f'[警告] 程序异常。请保持页面在前台显示,避免遮挡或最小化')
|
if not message: raise Exception('程序异常。请保持页面在前台显示,避免遮挡或最小化')
|
||||||
else: print(f'[警告] ({attempt}): {message}')
|
print(f'[警告] ({attempt}): {message}')
|
||||||
|
|
||||||
# 关闭警告
|
# 关闭警告
|
||||||
click("div.io-ox-alert.io-ox-alert-error button[data-action='close']")
|
click("div.io-ox-alert.io-ox-alert-error button[data-action='close']")
|
||||||
except TimeoutException:
|
except TimeoutException:
|
||||||
sents[current] = '✔'
|
sents[current] = '✔️'
|
||||||
occurrence[0] += 1
|
occurrence[0] += 1
|
||||||
sent += 1
|
sent += 1
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user