优化驱动使用逻辑 @xrilang

This commit is contained in:
萌狼蓝天 2024-07-23 14:17:40 +08:00
parent e18d62d6bb
commit cd16467312

View File

@ -65,6 +65,7 @@ sio.connect("ws://"+host+":"+port)
# WebDriver初始化
def init_webdriver(driver_type):
# 先检查是否配置了自行安装的驱动
try:
if driver_type.lower() == "edge" and driver_path_edge: # 只有在Edge类型且路径已知的情况下才尝试使用已存在的驱动
edge_options = Options() # 创建Edge的Options实例