![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
selenium
xt_
qa
展开
-
selenium+python,driver.add_cookie()跳过登录验证码
当登录功能需要验证码时,我们可以使用driver.add_cookie()方法跳过验证码1、首先看wevdriver中add_cookie方法:def add_cookie(self, cookie_dict): """ Adds a cookie to your current session. :Args: - cookie_dict: A diction...原创 2018-12-02 16:22:15 · 6493 阅读 · 0 评论 -
selenium+python 调起浏览器报错raise WebDriverException("Can not connect to the Service %s" % self.path)
raise WebDriverException(“Can not connect to the Service %s” % self.path)原因:本地hosts解析少 127.0.0.1 localhost,加上就就行原创 2018-12-01 20:52:34 · 2351 阅读 · 0 评论 -
selenium+python,使用baidu浏览器搜索
#coding=utf8from selenium import webdriverfrom selenium.webdriver.common.keys import Keysimport timeimport sysbrowser = webdriver.Chrome()browser.get(‘https://www.baidu.com/’)#检查页面titleassert ...原创 2018-12-01 21:12:33 · 234 阅读 · 0 评论