火狐selenium录制的动作生成Python文件后用eclipse执行报错,求解!

pydev debugger: starting (pid: 4260)

E

ERROR: test_segwayrobot (__main__.Segwayrobot)

Traceback (most recent call last):
File "D:\ECLIPSE\workspace\pythontest\src\test001.py", line 19, in setUp
self.driver = webdriver.Firefox()
File "C:\Users\twili\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 80, in init
self.binary, timeout)
File "C:\Users\twili\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 52, in init
self.binary.launch_browser(self.profile, timeout=timeout)
File "C:\Users\twili\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "C:\Users\twili\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 108, in _wait_until_connectable
% (self.profile.path))
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: C:\Users\twili\AppData\Local\Temp\tmph0_128o3 If you specified a log_file in the FirefoxBinary constructor, check it for details.


Ran 1 test in 92.446s

FAILED (errors=1)

2个回答

Can't load the profile. Profile Dir: C:\Users\twili\AppData\Local\Temp\tmph0_128o3

应该是这个firefox的配置文件不正确或不存在了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问