selenium浏览器及驱动器

1、谷歌浏览器驱动获取地址:http://chromedriver.storage.googleapis.com/index.html
2、火狐浏览器驱动获取地址:https://github.com/mozilla/geckodriver/releases
3、Edge浏览器驱动获取地址:https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Selenium可以使用第三方浏览器来进行自动化测试,包括360安全浏览器。确切地说,你可以通过指定360安全浏览器的路径来配置Selenium驱动。有两种不同的方法可以实现这一点。 方法一: 你可以在代码中使用`webdriver.ChromeOptions()`来创建`chrome_options`对象,并将`binary_location`属性设置为360安全浏览器的路径。例如: ``` from selenium import webdriver chrome_options = webdriver.ChromeOptions() chrome_options.binary_location = r"E:\360安全浏览器\360se6\Application\360se.exe" ``` 然后,你可以将`chrome_options`对象作为参数传递给`webdriver.Chrome()`方法来创建Chrome驱动器实例。例如: ``` driver = webdriver.Chrome(chrome_options=chrome_options) ``` 方法二: 你也可以在代码中直接设置环境变量来指定360安全浏览器的路径。例如: ``` import os os.environ["webdriver.chrome.driver"] = r"E:\360安全浏览器\360se6\Application\360se.exe" ``` 然后,你可以在代码中使用`webdriver.Chrome()`方法创建Chrome驱动器实例,Selenium将自动使用环境变量中的路径。 请注意,在使用这些方法之前,你需要先安装Selenium和Chrome驱动器,并将其添加到系统路径中。 总结起来,你可以使用上述方法之一来设置Selenium驱动以使用360安全浏览器进行自动化测试。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [Python selenium 控制 360安全浏览器](https://blog.csdn.net/zhouyinlong1990/article/details/122678908)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值