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