Fixed webdriver could not load the profile.
上一篇 /
下一篇 2014-07-02 15:03:44
/ 个人分类:软件测试
Fixing “selenium.common.exceptions.WebDriverException: Message: ‘Can\’t load the profile.
source: http://pydelion.com/
Getting such error while using selenium with Python means that you most probably updated Firefox and didn’t selenium.
[dante@j ~]# pip-python install -U selenium
[dande@j ~]$ python zs.py
Traceback (most recent call last):
File "zs.py", line 6, in <module>
browser = webdriver.Firefox()
File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 58, in __init__
self.binary, timeout),
File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 48, in launch_browser
self._wait_until_connectable()
File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 95, in _wait_until_connectable
self.profile.path, self._get_firefox_output()))
selenium.common.exceptions.WebDriverException: Message: 'Can\'t load the profile. Profile Dir: /tmp/tmpOGd4Im Firefox output: Xlib: extension "RANDR" missing on displa
y ":1".\n*** LOG addons.xpi: startup\n*** LOG addons.xpi: checkForChanges\n*** LOG addons.xpi: No changes found\n'
[dande@j ~]$
Fixing:
[dante@j ~]$ sudo pip install -U selenium
Downloading/unpacking selenium
Downloading selenium-2.32.0.tar.gz (2.5Mb): 2.5Mb downloaded
Running setup.py egg_info for package selenium
Installing collected packages: selenium
Found existing installation: selenium 2.30.0
Uninstalling selenium:
Successfully uninstalled selenium
Running setup.py install for selenium
Successfully installed selenium
Cleaning up...
[dante@j ~]#
相关阅读:
- 使用Selenium/Ant做Web应用远程自动化测试 (zaza9084, 2014-6-05)
- Webdriver 自动化测试初试 (zaza9084, 2014-6-17)
- 我在兰亭这三年之自动化框架升级 (zzzmmmkkk, 2014-6-07)
- Selenium支付高版本的FireFox (zaza9084, 2014-6-13)
- 使用Python Selenium进行自动化功能测试 (zaza9084, 2014-6-16)
- Python Selenium自动化(一)点击页面链接测试 (zaza9084, 2014-6-17)
- Python Selenium自动化(二)自动化注册流程 (zaza9084, 2014-6-18)
- Python Selenium自动化(三)Chrome Webdriver的兼容 (zaza9084, 2014-6-19)
- Selenium基本使用与注意事项 (zaza9084, 2014-6-26)
- Selenium模拟光标进入和tab键移动 (zaza9084, 2014-7-01)
收藏
举报
TAG:
Selenium
webdriver
selenium