📅  最后修改于: 2022-03-11 14:56:34.086000             🧑  作者: 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