上一页 1 ··· 4 5 6 7 8
摘要: #先定位到下拉框 se1 = driver.find_element_by_id("list") #通过索引值来定位 从0开始#Select(se1).select_by_index(1) #通过value属性值等于多少定位#Select(se1).select_by_value("1") #通过文 阅读全文
posted @ 2022-04-20 14:00 GoodMorning9527 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 之前在做实验的时候用pycharm安装第三方工具包的时候出现了如下问题Try to run this command from the system terminal。 虽然在pycharm当中会出现这个问题,但是当我使用cmd命令行执行pip install的时候没有发生错误,但是如果每次要安装的 阅读全文
posted @ 2022-04-20 09:52 GoodMorning9527 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 根据字面意思理解,一直以为是pip版本不对导致的,于是花费时间在更新pip版本上。根据导入模块时错误提示信息可以看出,我的pycharm路径为C:\Users\Administrator.USER-20190620KX\PycharmProjects\untitled20\Scripts。在该径路下 阅读全文
posted @ 2022-04-19 11:26 GoodMorning9527 阅读(1363) 评论(0) 推荐(0) 编辑
摘要: 111 阅读全文
posted @ 2022-04-17 20:46 GoodMorning9527 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 1,在自定义固件时,在pytest.fixture装饰器中通过传入参数autouse=True来实现自动调用固件;(每个用例都会调用) 1)pytest.mark.skip(reason):装饰一个用例,作用是跳过这条用例不执行 2)pytest.mark.skipif(condition,reas 阅读全文
posted @ 2022-04-16 21:53 GoodMorning9527 阅读(31) 评论(0) 推荐(0) 编辑
摘要: import pytestfrom selenium import webdriver@pytest.fixture()def test_dakaibaidu(): driver = webdriver.Chrome() yield driver driver.quit()class Test_DK 阅读全文
posted @ 2022-04-16 19:22 GoodMorning9527 阅读(21) 评论(0) 推荐(0) 编辑
摘要: (1) yield语句,作用是一方面可以实现函数或者方法的返回,此时相当于return语句,同时可以把函数变成一个生成器; (2) 自定义固件中,yield语句前实现setup,yield语句后实现teardown; (3) 固件创建对象,需要返回,要用yield(return没有yield) (4 阅读全文
posted @ 2022-04-13 22:25 GoodMorning9527 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 要把setUpModule和tearDownModule放到Class外面去,即import语句的下一行。 阅读全文
posted @ 2022-04-05 16:10 GoodMorning9527 阅读(198) 评论(0) 推荐(0) 编辑
摘要: pytest执行用例报“Skipped: no variables file” 使用pycharm运行pytest+selenium的测试用例时报错“Skipped: no variables file”,找了很多帖子、方法都没效果,后来看到一个帖子说可能是pycharm同时装了pytest-sel 阅读全文
posted @ 2022-04-05 15:10 GoodMorning9527 阅读(72) 评论(0) 推荐(0) 编辑
摘要: importError:cannot import name 'InvalidArgumentException' 报错解决方法: 安装好了Appium-Python-Client,去检测的时候报以下错误 去C:\Python35\Lib\site-packages\selenium\common找 阅读全文
posted @ 2022-03-20 16:00 GoodMorning9527 阅读(140) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8