it('execute a system command', function() {
// so you can take actions necessary for your test outside the scope of Cypress.
cy.exec('echo Best Fei')
.its('stdout').should('contain', 'Best Fei')
// we can use Cypress.platform string to select appropriate command
cy.log(`Platform ${Cypress.platform} architecture ${Cypress.arch}`)
})
![](https://img.haomeiwen.com/i4225600/cb02dca75544dee0.png)
网友评论