位置:学校首页 > 学校动态>郑州python培训机构榜
郑州python培训机构榜,郑州百知IT设计培训费用价格适中,物有所值,专注培养设计实战型人才,基础入门学得会!
selenium-server-standalone-XXX.jar
对!就是这个东西,把它下载下来并解压;
在selenium-server-standalone-xxx.jar目录下使用命令java-jar
selenium-server-standalone-xxx.jar启动(如果打不开,查看是否端口被占用:
netstat-aon|findstr 4444)。
至此步骤完毕
接下来是一些注意事项,是我配置想启动的过程中遇到的问题,希望对你们有所帮助:
1.我写了个入门的python+webdriver脚本:
出现error:
Traceback(most recent call last):File"C:Python27Libaa.py",line 1,in from selenium import webdriverImportError:No module named selenium
解决方案:没有找到selenium,好吧他说selenium没装,但是我真的安装的啊。我勒个去。于是我把我之前selenium-2.35.0.tar删了,在线用pip命令操作安装selenium,发现用from selenium import webdriver还是报错,于是找啊找,参见该博客http://blog.sina.com.cn/s/blog_416544cb0101kzua.html
重启电脑,这里如果不重启,不生效,OK,这个重启电脑搞定这个问题
2.我相信很多人会去手写python脚本
请大家注意调用浏览器首字母要大写。。。(今天差点弄死我),如:Firefox,Chrome,Ie
3.注意得把IEDriverServer跟chromedriver放到对应浏览器的安装目录下
配置浏览器的环境变量Path:如
Chrome:C:UserswyxAppDataLocalGoogleChromeApplication
4.在python的安装目录下也放IEDriverServer,chromedriver