fix: prompt re-login on expired Selenium session to prevent crash
This commit is contained in:
parent
982e70a4e4
commit
82fb61ec26
4
main.py
4
main.py
|
@ -9,6 +9,7 @@ import logging
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from selenium.common.exceptions import InvalidSessionIdException
|
||||
from utils.cli import cli
|
||||
from utils.driver import get_driver
|
||||
from utils.EIP_action import ActionType, Action
|
||||
|
@ -98,6 +99,9 @@ def main(opt):
|
|||
if keep_login_status(driver, login_info):
|
||||
action_agent.run(action_code)
|
||||
|
||||
except InvalidSessionIdException:
|
||||
print("Session has expired, please re-login.")
|
||||
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue