@pytest.fixture() def login(): print("打开浏览器,登录成功") yield #用例执行成功后执行,相当于teardown print("关闭浏览器") def test(login): ...
確定! 回上一頁