Python+Selenium 环境配置

前期准备:      

1.安装Python     (建议3.6 比较稳定) 

2.   安装selenium包      (以下二选一)

  方法一:pycharm 中安装

  方法二: cmd  pip  install semenium

3.与浏览器对应的驱动  (驱动下载后直接放在Python安装路径中   调用时就不用写路径了)

Chrome:https://sites.google.com/a/chromium.org/chromedriver/downloads

    备用地址:http://chromedriver.storage.googleapis.com/index.html

Firefox:https://github.com/mozilla/geckodriver/releases

IE::http://selenium-release.storage.googleapis.com/index.html



eg:这样就可以启动浏览器了

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容