📅  最后修改于: 2022-03-11 15:02:13.461000             🧑  作者: Mango
// Adding the command
function foo() {
return cy.wrap('foo');
}
Cypress.Commands.add('foo', foo);
//Using the command
cy.foo().then(value => console.log(value)); // foo