python selenium pytest allure
AI 回答
由 glm-4-flash 生成 · 仅供参考,请自行核实
1. 安装依赖
pip install selenium pytest allure
2. 编写测试用例
from selenium import webdriver
from allure import step
@step("打开网页")
def test_open_page():
driver = webdriver.Chrome()
driver.get("https://www.example.com")
assert "Example Domain" in driver.title
driver.quit()
3. 运行测试
pytest test_file.py
4. 生成报告
pytest --allure-report ./report
pip install selenium pytest allure
2. 编写测试用例
from selenium import webdriver
from allure import step
@step("打开网页")
def test_open_page():
driver = webdriver.Chrome()
driver.get("https://www.example.com")
assert "Example Domain" in driver.title
driver.quit()
3. 运行测试
pytest test_file.py
4. 生成报告
pytest --allure-report ./report
没有找到「python selenium pytest allure」相关的内容
建议:检查关键词是否有错别字,或换一个更常见的说法。