![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
selenium自动化
selenium自动化
公子清羽
这个作者很懒,什么都没留下…
展开
-
python之线程threading模块和多线程启动不同浏览器
import threadingimport timedef test(): for i in range(10): print("test is run:", i) time.sleep(1)if __name__ == '__main__': # 创建子线程 t1 = threading.Thread(target=test) t1.setDaemon(True) #设置t1(test函数)为守护线程,当主线程结束了,也随之结束.原创 2020-09-27 00:36:41 · 452 阅读 · 0 评论 -
python线程池(threadpool)实现多线程生成HTMLTestRunner测试报告
#python线程池(threadpool)#pip install threadpool"""使用介绍(1)引入threadpool模块(2)定义线程函数(3)创建线程 池threadpool.ThreadPool()(4)创建需要线程池处理的任务即threadpool.makeRequests()(5)将创建的多个任务put到线程池中,threadpool.putRequest(6)等到所有任务处理完毕theadpool.pool()"""import unitt.原创 2020-09-28 15:35:04 · 402 阅读 · 0 评论 -
Selenium+WebDriver 各浏览器驱动下载与版本对应
一、chromedriver要与chrome版本对应chromedriver与chrome浏览器版本对应表(记得就会更新):chromedriver版本 支持的Chrome版本 v2.36 v64-66 v2.35 v62-64 v2.34 v61-63 v2.33 v60-62 v2.32 v59-61 v2.31 v58-60 v2.30 v58-60 v2.29 v56-58 v2.28 v55-5原创 2020-09-27 16:53:37 · 6495 阅读 · 0 评论 -
selenium自动化之访问百度
selenium自动化#coding=utf-8#为了防止乱码问题,以及方便的添加中文注释,把编码格式统一定义为utf-8fromseleniumimportwebdriver#导入webdriver模块importtimedriver=webdriver.Chrome()#创建chrome浏览器驱动对象url="https://www.baidu.com/"driver.get(url)#请求访问百度time.sleep(2)driver...原创 2020-06-22 18:21:12 · 757 阅读 · 0 评论