登录失败, 账号密码失败进行截图
This commit is contained in:
@@ -978,7 +978,7 @@ def playwright_m_login(username, password, code_2fa=None):
|
||||
failed_login = page.query_selector(failed_login_selector)
|
||||
if failed_login:
|
||||
# 登录失败, 返回失败信息
|
||||
page.screenshot(path=os.path.join('./log/screenshot/', f'{username}_{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())}_login_failed.png'))
|
||||
page.screenshot(path=f'./log/screenshot/{username}_{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())}_login_failed.png')
|
||||
logger.info(f"用户名:{username} 密码错误 {failed_login.text_content()}")
|
||||
raise OperationFailed(failed_login.text_content())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user