環境:Win7
Firefox瀏覽器版本37.0.1
Python36
Selenium2.53.0python
在Pycharm裏執行如下3行腳本:web
from selenium import webdriver
browser = webdriver.Firefox()
browser.get("http://www.baidu.com")瀏覽器
報錯以下:spa
File "/python36/Lib/site-packages/selenium/webdriver/firefox/webdriver.py", line 62, in __init__
firefox_options.binary_location = self.binary if isinstance(self.binary, basestring) else self.binary._get_firefox_start_cmd()
NameError: name 'basestring' is not definedfirefox
解決方法:將2.53.0版本的selenium卸載掉,安裝2.53.1版本的seleniumget