我在mac上使用了Python3和selenium 2.53.6,它确实打开了firefox,但没有打开我指定的页面。我试着打开“inventwithpython.com“但是我的程序只会启动firefox并返回这个错误。在
以下是我的代码:
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('http://inventwithpython.com')
我还得到以下错误:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/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: /var/folders/4c/gsw7v5b118j406zxj3lxctt40000gn/T/tmpv963_mt0 If you specified a log_file in the FirefoxBinary constructor, check it for details.
你能试试这个吗?告诉我发生了什么?在
确保二进制文件的路径是您正常触摸Firefox时启动的实际路径。在
编辑:
哦,在我忘了之前,一定要把这件事做好。只是为了确定。在
^{pr2}$因为如果我没记错的话,有一个档案的修复程序。所以让我们确定这不是一件事。在
相关问题 更多 >
编程相关推荐