pytest:allure使用
摘要:1.pip install allure-pytest 2.执行时pytest xx.py --alluredir ./reportdir,会在该目录下生产reportdir文件夹存储测试报告 3.转化测试报告:allure server report
阅读全文
pytest执行时提示找不到另一个文件的类
摘要:在命令行执行:pytest xx.py ,提示找不到另一个文件yy里的包 解决办法:在xx.py导包前加上以下两句: import sys from os.path import dirname sys.path.append(dirname(dirname(__file__)))
阅读全文
python_selenium:xptah高级使用
摘要:1.使用多个条件组合查询://*/div[@class='' and @id = ''] 2.使用container包含://*/span[contains(@class,'xxxxxxxxxxxxx') and @title=''] 解释:span标签的class包含了"xxxxxxxxxxx"则
阅读全文