大家好,又见面了,我是你们的朋友全栈君。
1.安装python27 双击执行python-2.7.15.msi,选择装到根目录,建议d:Python27。一路下一步,直到完成。安装完成之后,打开cmd,输入:python,如果显示以下内容则说明安装python成功
如果提示命令不存在则需要设置环境变量。 windows:右键我的电脑–属性–高级系统设置–高级–环境变量–系统变量 找到path项,加上值,D:Python27;D:Python27Scripts 然后重新打开cmd,执行python,即可得到上图,说明python安装成功。 2.安装selenium 打开目录到 D:Python27Scripts,按住shift,右键,选择在此处打开powershell窗口,输入命令: pip install selenium 即可自动完成selenium的安装。 需要啥插件,安装方式都是这样。
3.安装pycharm 双击执行pycharm-professional-2018.2.3.exe,一路下一步,直接到完成,运行即可。 4.激活pycharm 该版本是2018版本,因此需要激活。 首先在C:WindowsSystem32driversetchosts 添加 0.0.0.0 account.jetbrains.com 然后复制激活码
K71U8DBPNE-eyJsaWNlbnNlSWQiOiJLNzFVOERCUE5FIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJXUyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IlJEIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUkMiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkRCIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUk0iLCJwYWlk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7Z2gsx5LcIf5kYNsqJ0GavXTVyWh7PYiKX4bs354ZQLUwwa/cG 2 wNWP HtBhVxMRNTdVhSm38AknZlD PTAsWGu9GyLmhti2EnVwGybSD2Dxmhxk3IPCkhKAK pl0eWYGZWG3tJ9mZ7SowcXLWDFAk0lRJnKGFMTggrWjV8GYpw5bq23VmIqqDLgkNzuoog== 选择activity-code激活方式,填入激活码,即可激活工具。激活到明年5月,过期后选择在激活即可。 5.导入工程 file –open–工程所在根目录,打开即可。 6.添加浏览器驱动 目前我们测试环境以chrome浏览器为主,这里只针对chrome浏览器做说明。 chrome浏览器驱动下载地址: http://npm.taobao.org/mirrors/chromedriver chromedriver对应版本 https://blog.csdn.net/huilan_same/article/details/51896672
7.配置工程依赖 file –setting–工程名字,如果python路径没有出来,自己选一下。然后确定即可。这样工程就添加成功了,可以运行。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/173150.html原文链接:https://javaforall.cn