*1.python的下载安装
官网下载:Download Python | Python.org
1)依照自己的系统,选择新版进行安装
2)选择自定义,记得勾上path路径(不用自己另外再添加配置),下一步,下一步,选择放置的位置,就安装好了
控制台输入python,测试是否安装成功,如下图则成功安装
2.pycharm安装
官网下载:https://www.jetbrains.com/pycharm/download/#section=windows
选择对应系统,下载安装即可
3.selenium安装
python安装selenium,使用pip指令,找到python安装包下面的pip路径,输入指令 pip install selenium,下图为已经安装的提示,新安装会出现download提示
pycharm安装selenium
File→Settings→Project:pythonProject→python Interpreter→左侧小加号
搜索selenium,进行安装就是啦
4.使用selenium调用chrome
chrome版本查看
chrome浏览器驱动下载地址:http://chromedriver.storage.googleapis.com/index.html
找到对应版本驱动
下载驱动,解压缩到python.exe同一个路径下
在此电脑—属性–高级系统设置–环境变量–PATH中添加驱动路径
打开pycharm
点击运行
可以用哦