Che*_*pez 6 javascript cypress
我已经开始使用 cypress 自动化,但我正在努力处理 JSON 文件。
任何人都知道我如何读取位于 ../example/vehicle.json 中的 JSON 文件?
我知道 cypress 是 JavaScript,但在 cypress 项目中导入 JQuery 时也遇到了麻烦。
小智 2
我从未与 Cypress 合作过,在查看文档时,我认为这可以帮助您
cy.fixture(filePath)
cy.fixture(filePath, encoding)
cy.fixture(filePath, options)
cy.fixture(filePath, encoding, options)
Run Code Online (Sandbox Code Playgroud)
请查看https://docs.cypress.io/api/commands/fixture.html#Syntax