我正在使用pytest和allure pytest来自动化我的web应用程序测试用例。 我的测试用例有以下格式:
import allure
from selenium import webdriver
class Test_Abc():
options = webdriver.ChromeOptions()
options.add_argument("--no-sandbox")
options.add_argument("--foreground")
options.add_argument('disable-infobars')
options.add_argument("--disable-extensions")
driver = webdriver.Remote(command_executor="http://127.0.0.1:4444/wd/hub", desired_capabilities=options.to_capabilities())
def test_check_reapply_page_001(self):
allure.attach(self.driver.get_screenshot_as_png(), "Failed", allure.attachment_type.PNG)
运行测试用例时,在诱惑附加命令:
AttributeError: 'module' object has no attribute 'attachment_type'
请告诉我如何克服这个错误?在
伦敦银行同业拆借:
诱惑力pytest==2.5.4
allure python commons==2.5.4
pytest==3.7.0
硒==3.141.0
尝试使用} module attachment type constant ,它是一个定义了}。在
type
^{extension
属性的{对于诱惑:
对于诱惑2:
^{pr2}$编辑:
看看allures own attachment tests。E、 g组:
相关问题 更多 >
编程相关推荐