各浏览器驱动下载地址及selenium配置

前言:为什么要记录这个文章呢,是因为每次浏览器更新或者一些其他问题导致需要重新找浏览器的驱动的时候就很麻烦,所以这里记录一下。

1、首先:进入selenium网站,看到以下页面(框出来的部分)点击进去就是下载驱动的地方:

Downloads | SeleniumDownloads Below is where you can find the latest releases of all the Selenium components. You can also find a list of …https://www.selenium.dev/downloads/

 在下面又列出来了可直接进入下载的链接:

 注:(1)注意操作系统的区别,最常见的Windows,Mac,Linux,

        (2)注意浏览器版本:Chrome和Edge下载对应版本即可,

                                              Firefox下载最新的试,不行的话再换

Chrome:

https://chromedriver.storage.googleapis.com/index.htmlhttps://chromedriver.storage.googleapis.com/index.html

Firefox:

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

Edge:

Microsoft Edge Driver - Microsoft Edge DeveloperClose the loop on your developer cycle by automating testing of your website in Microsoft Edge with Microsoft Edge Driverhttps://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/#downloads

2、驱动下载完成之后:

        驱动下载完成之后解压,放在python的安装目录即可--->     

 3、在pycharm中配置selenium

4、运行测试是否能打开此网站

from selenium import webdriver

ws = webdriver.Chrome()
# ws = webdriver.Firefox()
# ws = webdriver.Edge()
ws.maximize_window()
ws.get("http://www.baidu.com")

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值