python + selenium问题,谁能看一下,装了selenium 但是用不了 5
#coding=utf-8>>>seleniumTraceback(mostrecentcalllast):File"<pyshell#1>",line1,in<modu...
# coding=utf-8>>> seleniumTraceback (most recent call last): File "<pyshell#1>", line 1, in <module> seleniumNameError: name 'selenium' is not defined>>> import selenium>>> from selenium import webdriver>>> driver = webdriver.firefox()Traceback (most recent call last):
没有装好吗 展开
没有装好吗 展开
推荐于2018-05-15
展开全部
应该是webdriver.Firefox()吧,那个F大写吧;3.0版本的selenium调用firefox的时候好像要用的一个叫geckodriver.exe的才行,下载这个文件放到Python27\Scripts目录下就行(前提是Python27\Scripts目录在环境变量)。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询