[英]Selenium under Windows 7 cannot start FirefoxDriver: Can't load profile
I see a lot of similar questions as old as mammoth crap, which minds Firefox 22 or something like that. 我看到了很多类似的问题,就像猛ma的废话一样古老,它会影响Firefox 22或类似的东西。 I faced the same issue:
Can't load the profile. Profile Dir: c:\\users\\alp\\appdata\\local\\temp\\tmprcb81b
我遇到了同样的问题:
Can't load the profile. Profile Dir: c:\\users\\alp\\appdata\\local\\temp\\tmprcb81b
Can't load the profile. Profile Dir: c:\\users\\alp\\appdata\\local\\temp\\tmprcb81b
Unittest starts firefox, creates profile directory in %temp% succesfully, but after timeout fails with specified error message. Unittest启动firefox,成功在%temp%中创建配置文件目录,但是在超时后失败并显示指定的错误消息。 I am using latest Firefox (45.0b with multiprocessing) and Python 2.7.11
我正在使用最新的Firefox(具有多处理功能的45.0b)和Python 2.7.11
What have I tried: 我尝试了什么:
pip install -U selemiun
). pip install -U selemiun
)。 Pip upgrades from 2.5.0 to 2.5.1 without any affects. WARN
sign. WARN
符号。 Accordingly to log it looks like Firefox starting right and stops without any reasons. I am completely mad about it amd have no any ideas how to fix this issue. 我完全为之疯狂,并且对如何解决此问题一无所知。 Do you have any?
你有什么?
I still not found solution at this moment , but reasons is clear. 我还没有发现在这一刻的解决方案,但原因是显而易见的。 For that moment Firefox >=44 under Windows 7 x64 does not support injected Selenium's addon.
目前,Windows 7 x64下的Firefox> = 44不支持注入的Selenium插件。 It could be easily checked - once Firefox started (and nevertheless is invisible for selenium's engine) type
about:addons
and check "Extenstions" tab. 它很容易检查-Firefox启动后(尽管对于硒引擎来说是不可见的),键入
about:addons
并检查“扩展”选项卡。 On older version addon "WebDriver for Firefox" just marked as "unsigned and potentially dangerous". 在旧版本的附件中,“ WebDriver for Firefox”仅被标记为“未签名且可能有危险”。 On newer ones it is disabled.
在较新的版本上,它被禁用。
My current workaround (I do not want to downgrade my primary browser) is to download FireFox Portable, put it somewhere and instantiate driver with binary: 我当前的解决方法(我不想降级我的主浏览器)是下载FireFox Portable,将其放在某个位置并使用二进制实例化驱动程序:
self.driver = webdriver.Firefox(profile,
firefox_binary=FirefoxBinary(firefox_path=r'D:\path\to\old\crap\FireFox37\firefox.exe '))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.