Python 无法在Selenium中打开磁盘上的文件
我有一个html文件存储在磁盘上。我想用Selenium打开它。但这段代码引发了一个异常:Python 无法在Selenium中打开磁盘上的文件,python,selenium,Python,Selenium,我有一个html文件存储在磁盘上。我想用Selenium打开它。但这段代码引发了一个异常: driver.get("file:///home/me123/file1.html") firefox驱动程序的错误: File "/usr/lib/python3.4/socket.py", line 503, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
driver.get("file:///home/me123/file1.html")
firefox驱动程序的错误:
File "/usr/lib/python3.4/socket.py", line 503, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
嗯,对我有用。使用ChromeWebDriver。你能发布你的完整代码吗?嗯,对我有用。使用ChromeWebDriver。你能发布你的完整代码吗?