python selenium 入门使用教程-环境安装

本文详细介绍如何使用Selenium进行自动化测试,包括安装Python3.5及以上版本、PyCharm环境配置,以及selenium和webdriver的安装步骤。涵盖Firefox、Chrome、IE等浏览器的webdriver获取与设置,确保与selenium及浏览器版本兼容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前提条件:安装好python3.5及以上版本、安装好PyCharm

安装步骤

1、安装selenium

PyCharm-》File-》Settings-》Project Interpreter-》+-》selenium

2、安装webdriver

各大浏览器webdriver地址可参考:https://docs.seleniumhq.org/download/

Firefox:https://github.com/mozilla/geckodriver/releases/
Chrome:https://sites.google.com/a/chromium.org/chromedriver/ 或者
http://chromedriver.storage.googleapis.com/index.html
IE:http://selenium-release.storage.googleapis.com/index.html
:webdriver需要和对应的浏览器版本以及selenium版本对应

3、webdriver安装路径

WIN :复制webdriver到Python安装目录下

MAC:复制webdriver到/usr/local/bin目录下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值