selenium可以去到Firefox,ie,Chrome浏览器,其中ie和chrome需要安装相应浏览器的driver,
启动火狐时报错
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary'
capability provided, and no binary flag set on the command line
解决方法:
程序在webdriver.Firefox()时,从环境变量中没有找到Firefox的安装程序。所以在全局环境变量的Path中加入Firefox所在的安装路径,如"C:\Program Files (x86)\Mozilla Firefox"。
亲测已解决