04 2023 档案

python 使用selenium 不开启浏览器
摘要:selenium 不启动浏览器模式 打开浏览器再启动会浪费时间,对爬虫的性能也是个影响,还有一种就是不打开浏览器。 如下参数是针对chrome 的全局参数,不能自定义参数。 from selenium import webdriver # 还有一些其他的参数'''# 添加UAoptions.add_ 阅读全文

posted @ 2023-04-26 10:57 yanmay 阅读(2065) 评论(0) 推荐(0) 编辑

pytest结合allure-pytest插件 生成allure测试报告
摘要:注意:allure-pytest 从1.7之后已弃用,从2.0版本开始迁移至 allure-python 项目(即使用allure2),另外要运行allure命令行也需要Java的支持。 1、安装allure-pytest pip install -U allure-pytest 如果安装失败可以直 阅读全文

posted @ 2023-04-19 11:36 yanmay 阅读(491) 评论(0) 推荐(0) 编辑

python的pytest框架
摘要:pytest和unittest的区别: 1.安装需求不同。pytest为第三方单元测试库,需额外安装;unittest为标准库,无需额外安装。 2.用例编写规则不同。pytest编写规则较为简单,兼容性较好;unittest需按照固定的格式编写,较为复杂。 pytest优点: 能够支持简单的单元测试 阅读全文

posted @ 2023-04-10 18:24 yanmay 阅读(142) 评论(0) 推荐(0) 编辑

python UnitTest
摘要:UnitTest是python 自带的自动化测试框架 一、创建用例 二、添加用例到套件并执行用例 suit = unittest.TestSuite() suit.addTest(TestCase1.Test1.Test1("test_aaa")) #一次添加一条用例suit.addTest(Tes 阅读全文

posted @ 2023-04-07 15:46 yanmay 阅读(34) 评论(0) 推荐(0) 编辑

selenium Java基础一
摘要:selenium工作原理: 1、下载相应的浏览器驱动包 //设置环境变量 System setProperty("webdriver.firefox.marionete","D:\\geckodriver.exe"); //初始化driver WebDriver driver =new Firefo 阅读全文

posted @ 2023-04-04 11:52 yanmay 阅读(258) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示