方法1:
from selenium import webdriver
from pathlib import Path
driver = webdriver.Chrome()
file_path = Path(Path.cwd(), '上传下载.html')
driver.get('file:///' + str(file_path))
方法2:
from pathlib import Path
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('file:///' + str(Path(Path.cwd(), '弹窗.html')))