![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python Selenium 自动化
weixin_38892128
这个作者很懒,什么都没留下…
展开
-
python 正则表达式 re
正则表达写法:re.compile(r’表达式’)包含变量的正则表达式写法re.compile(r’表达式’+变量+’表达式’)re.compile(r’表达式(%s)表达式’ %变量)原创 2020-01-15 15:05:58 · 101 阅读 · 0 评论 -
解决:chromedriver错误 “您使用的是不受支持的命令行标记:--ignore-certificate-errors”
selenium打开chrome时,出现 “您使用的是不受支持的命令行标记:–ignore-certificate-errors”"是因为chrome和chromedriver版本不匹配匹配关系如下连接:http://chromedriver.storage.googleapis.com/index.html...原创 2019-01-24 16:30:42 · 2385 阅读 · 1 评论 -
解决:PyCharm中import自定义模块无法识别的问题
两步:打开File > Default Settings > Python Console,把选项(Add source roots to PYTHONPAT)点击勾选上右键点击自己的工作空间文件夹,找到Mark Directory as 选择Source Root,问题解决!...原创 2019-01-24 17:25:28 · 12626 阅读 · 12 评论 -
解决:webdriver.Firefox错误OSError: [Errno 20] Not a directory:
遇到错误OSError: [Errno 20] Not a directory: ‘/Users/PycharmProjects/automation_framework_demo/myself/geckodriver’driver = webdriver.Firefox('/Users/PycharmProjects/automation_framework_demo/myself/geck...原创 2019-01-25 11:56:45 · 6597 阅读 · 0 评论 -
读取config文件时路径os.path.realpath('.')
# coding:utf-8import ConfigParserimport osdef config_reader(): # 这个路径可以在文件被调用时,仍然路径正常 root_dir = os.path.realpath('.') config = ConfigParser.ConfigParser() file_path = root_dir ...原创 2019-01-28 17:09:46 · 460 阅读 · 0 评论